mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 14:38:49 +00:00
Add class for interactions
This commit is contained in:
1 parent
d0f1e940a5
commit
b96a73df6f
37 files changed
+1038
-1012
No files matched your search
@@ -47,15 +47,30 @@ module.exports = {
|
||||
logger.debug('Started handling interaction.');
|
||||
switch (interaction.type) {
|
||||
case InteractionType.ApplicationCommand:
|
||||
await handleCommand(interaction as ChatInputCommandInteraction, client, executionId);
|
||||
await handleCommand(
|
||||
interaction as ChatInputCommandInteraction,
|
||||
client,
|
||||
executionId,
|
||||
interactionIdentifier
|
||||
);
|
||||
break;
|
||||
|
||||
case InteractionType.ApplicationCommandAutocomplete:
|
||||
await handleAutocomplete(interaction as AutocompleteInteraction, executionId);
|
||||
await handleAutocomplete(
|
||||
interaction as AutocompleteInteraction,
|
||||
client,
|
||||
executionId,
|
||||
interactionIdentifier
|
||||
);
|
||||
break;
|
||||
|
||||
case InteractionType.MessageComponent:
|
||||
await handleComponent(interaction as MessageComponentInteraction, executionId);
|
||||
await handleComponent(
|
||||
interaction as MessageComponentInteraction,
|
||||
client,
|
||||
executionId,
|
||||
interactionIdentifier
|
||||
);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -67,7 +82,7 @@ module.exports = {
|
||||
}
|
||||
} catch (error) {
|
||||
logger.debug('Error while handling received interaction.');
|
||||
await handleError(interaction, error as CustomError, interactionIdentifier, executionId);
|
||||
await handleError(interaction, error as CustomError, executionId, interactionIdentifier);
|
||||
}
|
||||
|
||||
const outputTime: number = new Date().getTime();
|
||||
|
||||
Reference in new issue
Block a user