fix(Action): getChannel interaction DM #6280
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: