We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0510fd commit 84fad99Copy full SHA for 84fad99
src/events/interactionCreate.js
@@ -1,7 +1,19 @@
1
export default {
2
event: 'interactionCreate',
3
async execute(client, interaction) {
4
- try {
+ try {
5
+
6
+ if (interaction.isUserContextMenuCommand() === true) {
7
+ const contextMenu = client.contextMenus.get(interaction.commandName);
8
+ if (!contextMenu) return;
9
10
+ contextMenu.execute(client, interaction);
11
+ } catch (error) {
12
+ interaction.reply({ content: 'There was an error while executing this context menu!', ephemeral: true });
13
+ console.log(error);
14
+ }
15
16
17
if (interaction.isCommand()) {
18
const command = client.slashCommands.get(interaction.commandName);
19
if (!command) return;
0 commit comments