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(APIThreadChannel): add fields about new message counter capability #532

Merged
merged 2 commits into from
Jul 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 15 additions & 1 deletion deno/payloads/v10/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ export interface APIThreadChannel
*/
thread_metadata?: APIThreadMetadata;
/**
* The approximate message count of the thread, does not count above 50 even if there are more messages
* Number of messages (not including the initial message or deleted messages) in a thread
*
* If the thread was created before July 1, 2022, it stops counting at 50 messages
*/
message_count?: number;
/**
Expand All @@ -222,6 +224,12 @@ export interface APIThreadChannel
* The id of the last message sent in this thread (may not point to an existing or valid message)
*/
last_message_id?: Snowflake | null;
/**
* Number of messages ever sent in a thread
*
* Similar to `message_count` on message creation, but won't decrement when a message is deleted
*/
total_message_sent?: number;
}

export type APIGuildForumChannel = APIGuildTextChannel<ChannelType.GuildForum>;
Expand Down Expand Up @@ -490,6 +498,12 @@ export interface APIMessage {
* @deprecated Use `sticker_items` instead
*/
stickers?: APISticker[];
/**
* A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread
*
* It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread
*/
position?: number;
}

/**
Expand Down
16 changes: 15 additions & 1 deletion deno/payloads/v9/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ export interface APIThreadChannel
*/
thread_metadata?: APIThreadMetadata;
/**
* The approximate message count of the thread, does not count above 50 even if there are more messages
* Number of messages (not including the initial message or deleted messages) in a thread
*
* If the thread was created before July 1, 2022, it stops counting at 50 messages
*/
message_count?: number;
/**
Expand All @@ -222,6 +224,12 @@ export interface APIThreadChannel
* The id of the last message sent in this thread (may not point to an existing or valid message)
*/
last_message_id?: Snowflake | null;
/**
* Number of messages ever sent in a thread
*
* Similar to `message_count` on message creation, but won't decrement when a message is deleted
*/
total_message_sent?: number;
}

export type APIGuildForumChannel = APIGuildTextChannel<ChannelType.GuildForum>;
Expand Down Expand Up @@ -490,6 +498,12 @@ export interface APIMessage {
* @deprecated Use `sticker_items` instead
*/
stickers?: APISticker[];
/**
* A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread
*
* It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread
*/
position?: number;
}

/**
Expand Down
16 changes: 15 additions & 1 deletion payloads/v10/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ export interface APIThreadChannel
*/
thread_metadata?: APIThreadMetadata;
/**
* The approximate message count of the thread, does not count above 50 even if there are more messages
* Number of messages (not including the initial message or deleted messages) in a thread
*
* If the thread was created before July 1, 2022, it stops counting at 50 messages
*/
message_count?: number;
/**
Expand All @@ -222,6 +224,12 @@ export interface APIThreadChannel
* The id of the last message sent in this thread (may not point to an existing or valid message)
*/
last_message_id?: Snowflake | null;
/**
* Number of messages ever sent in a thread
*
* Similar to `message_count` on message creation, but won't decrement when a message is deleted
*/
total_message_sent?: number;
}

export type APIGuildForumChannel = APIGuildTextChannel<ChannelType.GuildForum>;
Expand Down Expand Up @@ -490,6 +498,12 @@ export interface APIMessage {
* @deprecated Use `sticker_items` instead
*/
stickers?: APISticker[];
/**
* A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread
*
* It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread
*/
position?: number;
}

/**
Expand Down
16 changes: 15 additions & 1 deletion payloads/v9/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ export interface APIThreadChannel
*/
thread_metadata?: APIThreadMetadata;
/**
* The approximate message count of the thread, does not count above 50 even if there are more messages
* Number of messages (not including the initial message or deleted messages) in a thread
*
* If the thread was created before July 1, 2022, it stops counting at 50 messages
*/
message_count?: number;
/**
Expand All @@ -222,6 +224,12 @@ export interface APIThreadChannel
* The id of the last message sent in this thread (may not point to an existing or valid message)
*/
last_message_id?: Snowflake | null;
/**
* Number of messages ever sent in a thread
*
* Similar to `message_count` on message creation, but won't decrement when a message is deleted
*/
total_message_sent?: number;
}

export type APIGuildForumChannel = APIGuildTextChannel<ChannelType.GuildForum>;
Expand Down Expand Up @@ -490,6 +498,12 @@ export interface APIMessage {
* @deprecated Use `sticker_items` instead
*/
stickers?: APISticker[];
/**
* A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread
*
* It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread
*/
position?: number;
}

/**
Expand Down