From 034782641a2e558d50a7645081c1c7a4f18bb04a Mon Sep 17 00:00:00 2001 From: Apokalypt <58733915+Apokalypt@users.noreply.github.com> Date: Thu, 23 Sep 2021 13:42:27 +0200 Subject: [PATCH] types(Interaction): improve type guard for inGuild() (#6644) --- typings/index.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index 332f33d6f..12aad2f51 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1025,7 +1025,11 @@ export class Interaction extends Base { public type: InteractionType; public user: User; public version: number; - public inGuild(): this is this & { guildId: Snowflake; member: GuildMember | APIInteractionGuildMember }; + public inGuild(): this is this & { + guildId: Snowflake; + member: GuildMember | APIInteractionGuildMember; + readonly channel: Exclude | null; + }; public isButton(): this is ButtonInteraction; public isCommand(): this is CommandInteraction; public isContextMenu(): this is ContextMenuInteraction;