Advertisement
Guest User

Untitled

a guest
Dec 13th, 2021
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module.exports = (bot, message) => {
  2.     if (message.author.bot) return;
  3.  
  4.     if (message.content.indexOf(bot.config.prefix) !== 0) return;
  5.  
  6.     const args = message.content.slice(bot.config.prefix.length).trim().split(/ +/g);
  7.     const command = args.shift().toLowerCase();
  8.  
  9.     const cmd = bot.commands.get(command);
  10.  
  11.     if (!cmd) return;
  12.  
  13.     cmd.run(bot, message, args);
  14.   };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement