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(Action): getChannel interaction DM #6280

Merged
merged 1 commit into from Aug 3, 2021
Merged

fix(Action): getChannel interaction DM #6280

merged 1 commit into from Aug 3, 2021

Conversation

muchnameless
Copy link
Contributor

Please describe the changes this PR makes and why it should be merged:
Since #5906 interaction channels get resolved by Action#getChannel, however this method does not account for the User being in data.user for interactions instead of data.author. Since the interaction data does not include a 'user_id' field a partial user with the id of undefined gets added to the cache if the interaction is triggered from a DM channel.
I am not too familiar with discord.js internals, so I hope this change does not break something elsewhere (tested it for a few days on a fork and my bot ran fine with it)

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

@iCrawl iCrawl added this to the Version 13 milestone Aug 2, 2021
@iCrawl iCrawl merged commit a72b5a3 into discordjs:master Aug 3, 2021
@muchnameless muchnameless deleted the getChannel-fix branch August 3, 2021 22:12
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

4 participants