Skip to content

Commit

Permalink
➕ Added Message command event (missed it)
Browse files Browse the repository at this point in the history
  • Loading branch information
TFAGaming authored Sep 7, 2022
1 parent 26c456a commit 5aa4b47
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions events/Guild/interactionCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ client.on('interactionCreate', async (interaction) => {
};
};

if (interaction.isMessageContextMenuCommand()) { // Message:
const command = client.message_commands.get(interaction.commandName);

if (!command) return;

try {
command.run(client, interaction, config, db);
} catch (e) {
console.error(e)
};
};

if (interaction.isModalSubmit()) { // Modals:
const modal = client.modals.get(interaction.customId);

Expand Down

0 comments on commit 5aa4b47

Please sign in to comment.