From da86bd4fa309bbf47e3b39d6669bf746cecf94da Mon Sep 17 00:00:00 2001 From: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com> Date: Wed, 1 Dec 2021 06:33:11 -0500 Subject: [PATCH] fix: Interaction channel type should be `GuildTextBasedChannels` when in guild (#6998) --- typings/index.d.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index 123991aeb6ab..22cd6bfb5c01 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -28,6 +28,7 @@ import { APIApplicationCommandPermission, APIAuditLogChange, APIButtonComponent, + APIChannel, APIEmbed, APIEmoji, APIInteractionDataResolvedChannel, @@ -1206,7 +1207,13 @@ export class Interaction extends Base { private readonly _cacheType: Cached; protected constructor(client: Client, data: RawInteractionData); public applicationId: Snowflake; - public readonly channel: CacheTypeReducer; + public readonly channel: CacheTypeReducer< + Cached, + GuildTextBasedChannel | null, + GuildTextBasedChannel | null, + GuildTextBasedChannel | null, + TextBasedChannels | null + >; public channelId: Snowflake | null; public readonly createdAt: Date; public readonly createdTimestamp: number; @@ -1505,7 +1512,6 @@ export class MessageCollector extends Collector { export class MessageComponentInteraction extends Interaction { protected constructor(client: Client, data: RawMessageComponentInteractionData); - public readonly channel: CacheTypeReducer; public readonly component: CacheTypeReducer< Cached, MessageActionRowComponent,