From 0e3e367c5689431376c1990b8bf9e051a927981f Mon Sep 17 00:00:00 2001 From: Emotion Date: Sun, 19 Mar 2023 22:50:24 +1300 Subject: [PATCH] Reverted events files back to v2.1.0 --- events/interactionCreate.js | 14 +++++++------- events/ready.js | 6 +----- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/events/interactionCreate.js b/events/interactionCreate.js index e7d06ea..3c4dc1a 100644 --- a/events/interactionCreate.js +++ b/events/interactionCreate.js @@ -1,13 +1,13 @@ module.exports = (client, interaction) => { - if (!interaction.isChatInteraction()) return; + + if (!interaction.isCommand()) return; const command = client.commands.get(interaction.commandName); - if (!command) - return void interaction.reply({ - content: `Command \`${interaction.commandName}\` not found.`, - ephermal: true, - }); - + if (!command) return void interaction.reply({ + content: `Command \`${interaction.commandName}\` not found.`, + ephemeral: true + }); + command.run(client, interaction); }; \ No newline at end of file diff --git a/events/ready.js b/events/ready.js index 420ebcf..27a69ab 100644 --- a/events/ready.js +++ b/events/ready.js @@ -3,11 +3,7 @@ module.exports = (client) => { `Ready to server in ${client.channels.cache.size} channels on ${client.guilds.cache.size} servers, for a total of ${client.users.cache.size} users.` ); - const activities = [ - `Giveaways in ${client.guilds.cache.size} guilds`, - "/help", - `over ${client.users.cache.size} users!` - ]; + const activities = [`Giveaways in ${client.guilds.cache.size} guilds`,`over ${client.users.cache.size} users!`]; setInterval(() => { let activity = activities[Math.floor(Math.random() * activities.length)]; client.user.setActivity(activity, { type: "WATCHING" });