From de31b44dba74fad338ca6067f72e833f765e232b Mon Sep 17 00:00:00 2001 From: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com> Date: Sat, 28 Jan 2023 20:48:21 -0600 Subject: [PATCH] fix: interaction followup type (#2747) * fix: readme runtime list * Fix code style issues with ESLint * node 18 * fix: websocket import type * fix: body for interaction requests * fix: perma fix for type error in ci * fix: followupmessage option type --------- Co-authored-by: Lint Action --- packages/client/src/Structures/channels/Guild.ts | 2 +- packages/rest/src/manager.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/client/src/Structures/channels/Guild.ts b/packages/client/src/Structures/channels/Guild.ts index d41351c8e..7cb480680 100644 --- a/packages/client/src/Structures/channels/Guild.ts +++ b/packages/client/src/Structures/channels/Guild.ts @@ -84,7 +84,7 @@ export class GuildChannel extends Channel { if (permission & BigInt(BitwisePermissionFlags.ADMINISTRATOR)) { return new Permission(BitwisePermissionFlags.ADMINISTRATOR) } - const channel = this instanceof ThreadChannel ? this.guild.channels.get(this.parentID) : this + const channel = this instanceof ThreadChannel && this.parentID ? this.guild.channels.get(this.parentID) : this let overwrite = channel?.permissionOverwrites.get(this.guild.id) if (overwrite) { permission = (permission & ~overwrite.deny) | overwrite.allow diff --git a/packages/rest/src/manager.ts b/packages/rest/src/manager.ts index 779ebc02f..215f37026 100644 --- a/packages/rest/src/manager.ts +++ b/packages/rest/src/manager.ts @@ -3371,7 +3371,7 @@ export interface RestManager { * * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message} */ - followup: (token: string, options: InteractionResponse) => Promise> + followup: (token: string, options: InteractionCallbackData) => Promise> /** * Sends a response to an interaction. * @@ -5036,7 +5036,7 @@ export interface RestManager { * * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message} */ - sendFollowupMessage: (token: string, options: InteractionResponse) => Promise> + sendFollowupMessage: (token: string, options: InteractionCallbackData) => Promise> /** * Sends a response to an interaction. *