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

fix(GuildChannel): check for community required channels in GuildChannel#deletable #5170

Merged
merged 4 commits into from Apr 14, 2021
Merged

Conversation

xiBread
Copy link
Contributor

@xiBread xiBread commented Dec 31, 2020

Please describe the changes this PR makes and why it should be merged:
Currently, GuildChannel#deletable will return true regardless if the channel is required for a community (rules, public updates) and will throw a 50074: Cannot delete a channel required for Community guilds. This PR adds an inequality check between the GuildChannel#id and the Guild#rulesChannelID or Guild#publicUpdatesChannelID

--

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.

Copy link
Contributor

@NotSugden NotSugden left a comment

Choose a reason for hiding this comment

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

style changes also needed

src/structures/GuildChannel.js Outdated Show resolved Hide resolved
src/structures/GuildChannel.js Outdated Show resolved Hide resolved
src/structures/GuildChannel.js Outdated Show resolved Hide resolved
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
@kyranet kyranet requested a review from iCrawl April 14, 2021 19:52
@iCrawl iCrawl merged commit b710a43 into discordjs:master Apr 14, 2021
@iCrawl iCrawl added this to the Version 13 milestone Jun 27, 2021
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.

None yet

9 participants