From 01f8d1bed564a07d40b184dc7ff686a895ddda31 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Thu, 2 Dec 2021 13:29:54 +0000 Subject: [PATCH] types(Interaction): Narrow `memberPermissions` (#7054) --- typings/index.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index e1fa6d906..2d8f3af9f 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1227,7 +1227,7 @@ export class Interaction extends Base { public type: InteractionType; public user: User; public version: number; - public memberPermissions: Readonly | null; + public memberPermissions: CacheTypeReducer>; public inGuild(): this is Interaction<'present'>; public inCachedGuild(): this is Interaction<'cached'>; public inRawGuild(): this is Interaction<'raw'>; @@ -1546,7 +1546,9 @@ export class MessageComponentInteraction e public static resolveType(type: MessageComponentTypeResolvable): MessageComponentType; } -export class MessageContextMenuInteraction extends ContextMenuInteraction { +export class MessageContextMenuInteraction< + Cached extends CacheType = CacheType, +> extends ContextMenuInteraction { public readonly targetMessage: CacheTypeReducer; public inGuild(): this is MessageContextMenuInteraction<'present'>; public inCachedGuild(): this is MessageContextMenuInteraction<'cached'>;