Skip to content

Commit

Permalink
feat(APIMessageInteraction): add member field
Browse files Browse the repository at this point in the history
  • Loading branch information
suneettipirneni committed Jan 19, 2022
1 parent 2c1fbda commit 971aa17
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
6 changes: 4 additions & 2 deletions deno/payloads/v8/_interactions/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import type { APIGuildMember } from '../guild.ts';
import type { APIUser } from '../user.ts';
import type { LocaleString } from '../../../v8.ts';

export type PartialAPIMessageInteractionGuildMember = Pick<APIGuildMember, 'roles' | 'mute' | 'joined_at' | 'deaf'>;

/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object
*/
Expand All @@ -22,9 +24,9 @@ export interface APIMessageInteraction {
*/
name: string;
/**
* The user who invoked the interaction
* The guild member who invoked the interaction, only sent in MESSAGE_CREATE events
*/
user: APIUser;
member?: PartialAPIMessageInteractionGuildMember;
}

/**
Expand Down
6 changes: 6 additions & 0 deletions deno/payloads/v9/_interactions/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import type { APIGuildMember } from '../guild.ts';
import type { APIUser } from '../user.ts';
import type { LocaleString } from '../../../v9.ts';

export type PartialAPIMessageInteractionGuildMember = Pick<APIGuildMember, 'roles' | 'mute' | 'joined_at' | 'deaf'>;

/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object
*/
Expand All @@ -25,6 +27,10 @@ export interface APIMessageInteraction {
* The user who invoked the interaction
*/
user: APIUser;
/**
* The guild member who invoked the interaction, only sent in MESSAGE_CREATE events
*/
member?: PartialAPIMessageInteractionGuildMember;
}

/**
Expand Down
6 changes: 4 additions & 2 deletions payloads/v8/_interactions/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import type { APIGuildMember } from '../guild';
import type { APIUser } from '../user';
import type { LocaleString } from '../../../v8';

export type PartialAPIMessageInteractionGuildMember = Pick<APIGuildMember, 'roles' | 'mute' | 'joined_at' | 'deaf'>;

/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object
*/
Expand All @@ -22,9 +24,9 @@ export interface APIMessageInteraction {
*/
name: string;
/**
* The user who invoked the interaction
* The guild member who invoked the interaction, only sent in MESSAGE_CREATE events
*/
user: APIUser;
member?: PartialAPIMessageInteractionGuildMember;
}

/**
Expand Down
6 changes: 6 additions & 0 deletions payloads/v9/_interactions/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import type { APIGuildMember } from '../guild';
import type { APIUser } from '../user';
import type { LocaleString } from '../../../v9';

export type PartialAPIMessageInteractionGuildMember = Pick<APIGuildMember, 'roles' | 'mute' | 'joined_at' | 'deaf'>;

/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object
*/
Expand All @@ -25,6 +27,10 @@ export interface APIMessageInteraction {
* The user who invoked the interaction
*/
user: APIUser;
/**
* The guild member who invoked the interaction, only sent in MESSAGE_CREATE events
*/
member?: PartialAPIMessageInteractionGuildMember;
}

/**
Expand Down

0 comments on commit 971aa17

Please sign in to comment.