diff --git a/src/transformers/channel.ts b/src/transformers/channel.ts index de5f3ca52..1faa52d7e 100644 --- a/src/transformers/channel.ts +++ b/src/transformers/channel.ts @@ -72,6 +72,8 @@ export function transformChannel( botIsMember: Boolean(payload.channel.member), archived: payload.channel.thread_metadata?.archived, locked: payload.channel.thread_metadata?.locked, + invitable: payload.channel.invitable, + createTimestamp: payload.channel.create_timestamp ? Date.parse(payload.channel.create_timestamp) : undefined, }; } @@ -142,4 +144,6 @@ export interface DiscordenoChannel { parentId?: bigint; /** The voice states that are in this channel assuming it is a voice channel. */ voiceStates?: Collection; + /** timestamp when the thread was created; only populated for threads created after 2022-01-09 */ + createTimestamp?: number; } diff --git a/src/types/channels/channel.ts b/src/types/channels/channel.ts index 8e4fac1e5..01636fea5 100644 --- a/src/types/channels/channel.ts +++ b/src/types/channels/channel.ts @@ -58,4 +58,8 @@ export interface Channel { defaultAutoArchiveDuration?: number; /** computed permissions for the invoking user in the channel, including overwrites, only included when part of the resolved data received on a application command interaction */ permissions?: string; + /** whether non-moderators can add other non-moderators to a thread; only available on private threads */ + invitable?: boolean; + /** timestamp when the thread was created; only populated for threads created after 2022-01-09 */ + createTimestamp?: string; } diff --git a/src/types/channels/threads/threadMetadata.ts b/src/types/channels/threads/threadMetadata.ts index d0d56afe8..209d0862d 100644 --- a/src/types/channels/threads/threadMetadata.ts +++ b/src/types/channels/threads/threadMetadata.ts @@ -10,4 +10,6 @@ export interface ThreadMetadata { locked?: boolean; /** whether non-moderators can add other non-moderators to a thread; only available on private threads */ invitable?: boolean; + /** Timestamp when the thread was created; only populated for threads created after 2022-01-09 */ + createTimestamp: string; }