Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Guild): add fetchWidget() for getting widget data #6180

Merged
merged 2 commits into from
Jul 27, 2021

Conversation

advaith1
Copy link
Contributor

Please describe the changes this PR makes and why it should be merged:
Currently, you can fetch a guild's widget data with Client#fetchWidget(guild), but you can't do it from the guild object. Now, you can use Guild#fetchWidget() as a shortcut. The old fetchWidget and setWidget methods have been renamed to fetchWidgetSettings and setWidgetSettings to more accurately explain their functionality.

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating
  • This PR changes the library's interface (methods or parameters added)
  • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)

@DTrombett
Copy link
Contributor

DTrombett commented Jul 24, 2021

Mmh, I see that there are methods on the Client object like fetchGuildPreview and fetchGuildTemplate that start with fetchGuild as they're related to guilds, so wouldn't be better to rename Client#fetchWidget() to Client#fetchGuildWidget() too?

@advaith1
Copy link
Contributor Author

hm, maybe? cc @discordjs/the-big-3 (btw does this actually ping?)

@vladfrangu
Copy link
Member

hm, maybe? cc @discordjs/the-big-3 (btw does this actually ping?)

  1. Yes, yes it does ping
  2. That sounds like a change I'd be ok with, waiting on the other two to reply tho 👍

@iCrawl
Copy link
Member

iCrawl commented Jul 24, 2021

  1. Sounds good.

@SpaceEEC
Copy link
Member

Sounds good to me too.

@iCrawl iCrawl added this to the Version 13 milestone Jul 25, 2021
@iCrawl iCrawl merged commit b22272f into discordjs:master Jul 27, 2021
@advaith1 advaith1 deleted the guild-fetchwidget branch July 27, 2021 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants