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(ReactionCollector): check for channel.threads #7069

Conversation

kyranet
Copy link
Member

@kyranet kyranet commented Dec 6, 2021

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

Message#channel becomes null when the channel is deleted, so we cannot rely on it for handling channel deletions of a thread's parent. However, we can do the reverse and check whether the message's channel ID is a thread contained by the deleted channel.

Fixes #7066

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

@kyranet kyranet added this to the Version 13.4 milestone Dec 6, 2021
Copy link
Member

@vladfrangu vladfrangu left a comment

Choose a reason for hiding this comment

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

As long as it works with threads being deleted as well as normal channels and messages from a thread in a channel, and you make sure this isn't an issue in other collectors, LGTM

@iCrawl iCrawl merged commit 3846f0d into discordjs:main Dec 7, 2021
@kyranet kyranet deleted the fix/better-thread-check-for-reaction-collector branch December 7, 2021 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
4 participants