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: easier guards for channelUpdate #5716

Merged
merged 3 commits into from May 31, 2021
Merged

Conversation

almostSouji
Copy link
Member

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

Below guard fails on channelUpdate client events, however works flawlessly on channelDelete. By adapting the typings to DMChannel | GuildChannel the types are much easier guardable but still encompass all channel types.

if (channel instanceof DMChannel || !channel.isText()) return;

Status and versioning classification:

  • I know how to update typings and have done so, or typings don't need updating

typings/index.d.ts Outdated Show resolved Hide resolved
@iCrawl iCrawl merged commit d52bcd4 into discordjs:master May 31, 2021
@almostSouji almostSouji deleted the cu-typings branch May 31, 2021 15:51
@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

5 participants