Skip to content

fix(interactions): resolve the caller in DMs, not just in guilds - #17

Merged
Akayashuu merged 1 commit into
masterfrom
fix/interaction-user-in-dms
Aug 4, 2026
Merged

fix(interactions): resolve the caller in DMs, not just in guilds#17
Akayashuu merged 1 commit into
masterfrom
fix/interaction-user-in-dms

Conversation

@Akayashuu

Copy link
Copy Markdown
Collaborator

Discord carries the invoking user under member.user for a guild interaction and under user for a DM. Interaction only decoded the first, so any permission check reading it saw an empty id in a DM — a populated allowlist denied even its own owner there.

  • adds the user field to Interaction
  • adds UserID(), which reads whichever field Discord filled in
  • README documents it

Found while reviewing the owner-bound Discord gateway, which follows its operator into DMs.

Discord carries the invoking user under member.user for a guild interaction
and under user for a DM. Interaction only decoded the first, so every
permission check reading it saw an empty id in a DM — a populated allowlist
denied even its own owner there.

Add the user field, and UserID() to read whichever one Discord filled in.
@Akayashuu
Akayashuu merged commit adf2c5b into master Aug 4, 2026
1 check passed
@Akayashuu
Akayashuu deleted the fix/interaction-user-in-dms branch August 4, 2026 18:41
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.

1 participant