From 7e542152da2e58f44c2314d5bd3b04a518fa979e Mon Sep 17 00:00:00 2001 From: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com> Date: Tue, 1 Feb 2022 16:54:33 -0500 Subject: [PATCH] feat(GatewayThreadCreateDispatch): Add `newly_created` field` (#311) --- deno/gateway/v9.ts | 8 +++++++- gateway/v9.ts | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/deno/gateway/v9.ts b/deno/gateway/v9.ts index 61ddfebc1..9ee575fd3 100644 --- a/deno/gateway/v9.ts +++ b/deno/gateway/v9.ts @@ -27,6 +27,7 @@ import type { GatewayVoiceState, InviteTargetType, PresenceUpdateStatus, + APIThreadChannel, } from '../payloads/v9/mod.ts'; import type { Nullable } from '../utils/internals.ts'; @@ -1280,7 +1281,12 @@ export type GatewayThreadCreateDispatch = GatewayChannelModifyDispatch; /** * https://discord.com/developers/docs/topics/gateway#thread-create */ -export type GatewayThreadCreateDispatchData = GatewayChannelModifyDispatchData; +export interface GatewayThreadCreateDispatchData extends APIThreadChannel { + /** + * Whether the thread is newly created or not. + */ + newly_created: boolean; +} /** * https://discord.com/developers/docs/topics/gateway#thread-update diff --git a/gateway/v9.ts b/gateway/v9.ts index 87a6a5796..c8701a344 100644 --- a/gateway/v9.ts +++ b/gateway/v9.ts @@ -27,6 +27,7 @@ import type { GatewayVoiceState, InviteTargetType, PresenceUpdateStatus, + APIThreadChannel, } from '../payloads/v9/index'; import type { Nullable } from '../utils/internals'; @@ -1280,7 +1281,12 @@ export type GatewayThreadCreateDispatch = GatewayChannelModifyDispatch; /** * https://discord.com/developers/docs/topics/gateway#thread-create */ -export type GatewayThreadCreateDispatchData = GatewayChannelModifyDispatchData; +export interface GatewayThreadCreateDispatchData extends APIThreadChannel { + /** + * Whether the thread is newly created or not. + */ + newly_created: boolean; +} /** * https://discord.com/developers/docs/topics/gateway#thread-update