oops :derp:

This commit is contained in:
2026-10-14 18:19:12 +08:00
parent 687b647ca8
commit 5f7ad1921f
+2 -2
View File
@@ -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<void>)(client, interaction, ...interaction.customId.split('_').slice(1))
Promise.resolve((button.execute as (context: Client, interaction: ButtonInteraction, ...args: unknown[]) => Promise<void>)(client, interaction, ...interaction.customId.split('_').slice(1))
.catch(e => console.error('An error occurred while handling a button interaction: ', e)));
return;
}