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

Remove GuildChannel fallback, and remove GuildChannel as extendable #3165

Merged
merged 2 commits into from Apr 3, 2019

Conversation

Projects
None yet
5 participants
@bdistin
Copy link
Member

commented Mar 28, 2019

Please describe the changes this PR makes and why it should be merged:
A remake of #2138 with latest since original fork deleted. Theoretically Confirmed even with partials enabled fixes #3164

PR based on comments from Gawdl3y. Requesting review from @Gawdl3y.

Previously all known channel types are accounted for before defaulting to a generic GuildChannel if the channel type is unknown. If discord adds a channel type before the library properly handles it, this could lead to bugs of unknown impact (minor -> critical).

Because of this fallback, GuildChannel was added to the extendable-structures. (this also is not ideal since extensions to GuildChannel were not inherited by TextChannel or VoiceChannel) Now that the fallback is gone, we can cleanly remove it from the extendable structures.

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.
@Skillz4Killz

This comment has been minimized.

Copy link
Contributor

commented Mar 29, 2019

Tested this with my news channel on my server and it does fix the bot crashing.

@Jbforfun18

This comment was marked as spam.

Copy link

commented Mar 29, 2019

Stop

@SpaceEEC SpaceEEC merged commit bb92289 into discordjs:master Apr 3, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@bdistin bdistin deleted the bdistin:remove-guildChannel-fallback branch Apr 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.