Skip to content

Commit

Permalink
feat(APIMessage): add call (#983)
Browse files Browse the repository at this point in the history
  • Loading branch information
N1ckPro authored May 22, 2024
1 parent ddb2bde commit 79d9875
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 0 deletions.
18 changes: 18 additions & 0 deletions deno/payloads/v10/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,10 @@ export interface APIMessage {
* See https://support-dev.discord.com/hc/articles/4404772028055
*/
poll?: APIPoll;
/**
* The call associated with the message
*/
call?: APIMessageCall;
}

/**
Expand Down Expand Up @@ -879,6 +883,20 @@ export enum MessageFlags {
IsVoiceMessage = 1 << 13,
}

/**
* https://discord.com/developers/docs/resources/channel#message-call-object-message-call-object-structure
*/
export interface APIMessageCall {
/**
* Array of user ids that participated in the call
*/
participants: Snowflake[];
/**
* ISO8601 timestamp when the call ended
*/
ended_timestamp?: string | null;
}

/**
* https://discord.com/developers/docs/resources/channel#role-subscription-data-object-role-subscription-data-object-structure
*/
Expand Down
18 changes: 18 additions & 0 deletions deno/payloads/v9/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,10 @@ export interface APIMessage {
* See https://support-dev.discord.com/hc/articles/4404772028055
*/
poll?: APIPoll;
/**
* The call associated with the message
*/
call?: APIMessageCall;
}

/**
Expand Down Expand Up @@ -864,6 +868,20 @@ export enum MessageFlags {
IsVoiceMessage = 1 << 13,
}

/**
* https://discord.com/developers/docs/resources/channel#message-call-object-message-call-object-structure
*/
export interface APIMessageCall {
/**
* Array of user ids that participated in the call
*/
participants: Snowflake[];
/**
* ISO8601 timestamp when the call ended
*/
ended_timestamp?: string | null;
}

/**
* https://discord.com/developers/docs/resources/channel#followed-channel-object
*/
Expand Down
18 changes: 18 additions & 0 deletions payloads/v10/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,10 @@ export interface APIMessage {
* See https://support-dev.discord.com/hc/articles/4404772028055
*/
poll?: APIPoll;
/**
* The call associated with the message
*/
call?: APIMessageCall;
}

/**
Expand Down Expand Up @@ -879,6 +883,20 @@ export enum MessageFlags {
IsVoiceMessage = 1 << 13,
}

/**
* https://discord.com/developers/docs/resources/channel#message-call-object-message-call-object-structure
*/
export interface APIMessageCall {
/**
* Array of user ids that participated in the call
*/
participants: Snowflake[];
/**
* ISO8601 timestamp when the call ended
*/
ended_timestamp?: string | null;
}

/**
* https://discord.com/developers/docs/resources/channel#role-subscription-data-object-role-subscription-data-object-structure
*/
Expand Down
18 changes: 18 additions & 0 deletions payloads/v9/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,10 @@ export interface APIMessage {
* See https://support-dev.discord.com/hc/articles/4404772028055
*/
poll?: APIPoll;
/**
* The call associated with the message
*/
call?: APIMessageCall;
}

/**
Expand Down Expand Up @@ -864,6 +868,20 @@ export enum MessageFlags {
IsVoiceMessage = 1 << 13,
}

/**
* https://discord.com/developers/docs/resources/channel#message-call-object-message-call-object-structure
*/
export interface APIMessageCall {
/**
* Array of user ids that participated in the call
*/
participants: Snowflake[];
/**
* ISO8601 timestamp when the call ended
*/
ended_timestamp?: string | null;
}

/**
* https://discord.com/developers/docs/resources/channel#followed-channel-object
*/
Expand Down

0 comments on commit 79d9875

Please sign in to comment.