fix: add newly_created prop to channel for threads

This commit is contained in:
Skillz4Killz
2022-03-20 14:51:42 +00:00
committed by GitHub
parent ffb48d71ee
commit 3d81fa2008
2 changed files with 3 additions and 0 deletions

View File

@@ -64,6 +64,7 @@ export function transformChannel(
createTimestamp: payload.channel.thread_metadata?.create_timestamp
? Date.parse(payload.channel.thread_metadata.create_timestamp)
: undefined,
newlyCreated: payload.channel.newly_created,
};
return channel as Optionalize<typeof channel>;

View File

@@ -740,6 +740,8 @@ export interface DiscordChannel {
member?: DiscordThreadMember;
/** 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;
/** When a thread is created this will be true on that channel payload for the thread. */
newly_created?: boolean;
}
/** https://discord.com/developers/docs/topics/gateway#presence-update */