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(InteractionCreate): move to an Action handler #5906

Merged
merged 4 commits into from Jun 24, 2021

Conversation

monbrey
Copy link
Member

@monbrey monbrey commented Jun 22, 2021

Ignoring the much larger issues about Websocket and Action handlers still being separate, this moves the INTERACTION_CREATE logic over to an Action handler.

This allows Action#getChannel to be used for caching a partial DMChannel, preventing Interaction#channel from returning null with the CHANNEL partial enabled

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

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.

Meant to request changes, ^

@kyranet kyranet requested a review from vladfrangu June 23, 2021 10:49
@ImRodry
Copy link
Contributor

ImRodry commented Jun 23, 2021

The typings for Interaction#channel need to be updated to add null (seems like this was never added for some odd reason)

public channel: TextChannel | DMChannel | NewsChannel;

This should be

 public channel: TextChannel | DMChannel | NewsChannel | PartialDMChannel | null; 

@iCrawl iCrawl merged commit ea49f7c into discordjs:master Jun 24, 2021
@monbrey monbrey deleted the interaction-action-handler branch June 24, 2021 21:34
@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

6 participants