type before command

master
Kit Kasune 2 weeks ago
parent 5a0b4201f4
commit aa2512b537
  1. 1
      bot/runtime/events/messageCreate.js

@ -33,6 +33,7 @@ module.exports = async (client, message) => {
let cmdToRun = client.commands.get(cmd.name) || client.commands.get(client.aliases.get(cmd.name));
if (!cmdToRun) {return;}
await message.channel.sendTyping();
try {cmdToRun.run(client, message, args, cmd).catch(e => client.error(`There was an error in the ${cmdToRun.name} command.`, 0, 0, 1, e, '\n'));}
catch (e) {client.error(`There was an error in the ${cmdToRun.name} command.`, 0, 0, 1, e, '\n');}
};
Loading…
Cancel
Save