From 3b987d8bcb96a5cabc386ba16ae548c3a676daa4 Mon Sep 17 00:00:00 2001 From: Maksi <96802571+MaksiRose@users.noreply.github.com> Date: Thu, 22 Sep 2022 07:55:30 +0200 Subject: [PATCH 1/3] fix: RepliableInteraction respect cached generic --- packages/discord.js/typings/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index fa949af30c6e..9426947c188c 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -1499,7 +1499,7 @@ export type Interaction = | AutocompleteInteraction | ModalSubmitInteraction; -export type RepliableInteraction = Exclude; +export type RepliableInteraction = Exclude, AutocompleteInteraction>; export class BaseInteraction extends Base { // This a technique used to brand different cached types. Or else we'll get `never` errors on typeguard checks. private readonly _cacheType: Cached; From d534664812db07a618706a6f766ab85893ff6b6d Mon Sep 17 00:00:00 2001 From: Maksi <96802571+MaksiRose@users.noreply.github.com> Date: Thu, 22 Sep 2022 08:19:44 +0200 Subject: [PATCH 2/3] fix: prettier format --- packages/discord.js/typings/index.d.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 7dcdfd64bbd9..3e0c54edef68 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -1501,7 +1501,10 @@ export type Interaction = | AutocompleteInteraction | ModalSubmitInteraction; -export type RepliableInteraction = Exclude, AutocompleteInteraction>; +export type RepliableInteraction = Exclude< + Interaction, + AutocompleteInteraction +>; export class BaseInteraction extends Base { // This a technique used to brand different cached types. Or else we'll get `never` errors on typeguard checks. private readonly _cacheType: Cached; From c0f01a2b03c196e58429ab4b5e0127f30d5b9815 Mon Sep 17 00:00:00 2001 From: Maksi <96802571+MaksiRose@users.noreply.github.com> Date: Thu, 22 Sep 2022 21:11:58 +0200 Subject: [PATCH 3/3] Update packages/discord.js/typings/index.d.ts Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com> --- packages/discord.js/typings/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 3e0c54edef68..e2574e769bef 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -1505,6 +1505,7 @@ export type RepliableInteraction = Exclude Interaction, AutocompleteInteraction >; + export class BaseInteraction extends Base { // This a technique used to brand different cached types. Or else we'll get `never` errors on typeguard checks. private readonly _cacheType: Cached;