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: deprecate GuildEmbed methods and properties in favour of GuildWidget #4121

Merged
merged 7 commits into from
Aug 12, 2020

Conversation

NotSugden
Copy link
Contributor

@NotSugden NotSugden commented Apr 23, 2020

Please describe the changes this PR makes and why it should be merged:

This PR deprecates all of the methods and properties relating to GuildEmbed as its deprecated from the API (see discord/discord-api-docs#1536), and adds in new methods fetchWidget and setWidget

I wasn't sure whether to change the existing methods to use the widget endpoint since the methods are deprecated, the new methods should instead be used (although it will eventually lead to the old methods breaking)

I also thought it better to rename the existing typedefs (as that's not breaking since the return types are still the same) instead of making duplicate typedefs

Status

  • 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

Semantic versioning classification:

  • This PR changes the library's interface (methods or parameters added)
    • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
  • This PR only includes non-code changes, like changes to documentation, README, etc.

@advaith1
Copy link
Contributor

My relevant upstream API docs PR has been merged.

Copy link
Member

@SpaceEEC SpaceEEC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just small nits about the @deprecated annotations.

src/structures/Guild.js Outdated Show resolved Hide resolved
src/structures/Guild.js Outdated Show resolved Hide resolved
src/structures/Guild.js Outdated Show resolved Hide resolved
src/structures/Guild.js Outdated Show resolved Hide resolved
@advaith1
Copy link
Contributor

The deprecated guild embed properties and endpoints are removed in API v8.

typings/index.d.ts Outdated Show resolved Hide resolved
@iCrawl iCrawl dismissed stale reviews from vladfrangu and SpaceEEC August 12, 2020 07:29

Resolved

@iCrawl iCrawl merged commit e92cbc4 into discordjs:master Aug 12, 2020
@advaith1
Copy link
Contributor

just realized, would it be a good idea to document the replacements in the descriptions?

@iCrawl
Copy link
Member

iCrawl commented Aug 12, 2020

We did not do that in the past.

@NotSugden NotSugden deleted the guild_widget branch September 14, 2020 21:02
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.

7 participants