feat(types): message forwarding

This commit is contained in:
Marcos Susaña 2024-07-22 03:23:50 -04:00
parent bd951397a2
commit a99a3f32cd
No known key found for this signature in database

View File

@ -626,6 +626,10 @@ export interface APIMessage {
* See https://support-dev.discord.com/hc/articles/4404772028055
*/
poll?: APIPoll;
/**
* The message associated with the message_reference. This is a minimal subset of fields in a message (e.g. author is excluded.)
*/
message_snapshots?: APIMessageSnapshot[];
/**
* The call associated with the message
*/
@ -697,6 +701,20 @@ export interface APIMessageActivity {
party_id?: string;
}
/**
* https://discord.com/developers/docs/resources/channel#message-reference-types
*/
export enum MessageReferenceType {
/**
* A standard reference used by replies
*/
Default = 0,
/**
* Reference used to point to a message at a point in time
*/
Forward = 1,
}
/**
* https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
*/
@ -713,8 +731,39 @@ export interface APIMessageReference {
* ID of the originating message's guild
*/
guild_id?: Snowflake;
/**
* Type of reference
*/
type?: MessageReferenceType;
}
/**
* https://discord.com/developers/docs/resources/channel#message-snapshot-object
*/
export interface APIMessageSnapshot {
/**
* Subset of the message object fields
*/
message: APIMessageSnapshotFields;
/**
* Id of the origin message's guild
*/
guild_id?: Snowflake;
}
export type APIMessageSnapshotFields = Pick<
APIMessage,
| 'attachments'
| 'content'
| 'edited_timestamp'
| 'embeds'
| 'flags'
| 'mention_roles'
| 'mentions'
| 'timestamp'
| 'type'
>;
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-activity-types
*/