mirror of
https://github.com/nx-bat/discordbot-ng.git
synced 2026-11-11 07:13:37 -05:00
oops :derp:
This commit is contained in:
+2
-2
@@ -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 buttons from './buttons';
|
||||||
import { config } from './config';
|
import { config } from './config';
|
||||||
import events from './events';
|
import events from './events';
|
||||||
@@ -95,7 +95,7 @@ client.on('interactionCreate', async (interaction) => {
|
|||||||
for (const button of buttons) {
|
for (const button of buttons) {
|
||||||
if (button.id != id) continue;
|
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)));
|
.catch(e => console.error('An error occurred while handling a button interaction: ', e)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user