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; }