From 5f7ad1921f80b73079add01b0f591f90220abb18 Mon Sep 17 00:00:00 2001 From: Nix Krystik Date: Wed, 14 Oct 2026 18:19:12 +0800 Subject: [PATCH] oops :derp: --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index e83fb49..9aebe04 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -import { Client, GatewayIntentBits, MessageFlags, Partials } from 'discord.js'; +import { ButtonInteraction, Client, GatewayIntentBits, MessageFlags, Partials } from 'discord.js'; import buttons from './buttons'; import { config } from './config'; import events from './events'; @@ -95,7 +95,7 @@ client.on('interactionCreate', async (interaction) => { for (const button of buttons) { if (button.id != id) continue; - Promise.resolve((button.execute as (context: Client, ...args: unknown[]) => Promise)(client, interaction, ...interaction.customId.split('_').slice(1)) + Promise.resolve((button.execute as (context: Client, interaction: ButtonInteraction, ...args: unknown[]) => Promise)(client, interaction, ...interaction.customId.split('_').slice(1)) .catch(e => console.error('An error occurred while handling a button interaction: ', e))); return; }