19 lines
410 B
JavaScript
19 lines
410 B
JavaScript
module.exports = (client, message) => {
|
|
|
|
if (message.author.bot) return;
|
|
|
|
const prefix = client.config.prefix;
|
|
|
|
if (message.content.indexOf(prefix) !== 0) return;
|
|
|
|
const args = message.content.slice(prefix.length).trim().split(/ +/g);
|
|
const command = args.shift().toLowerCase();
|
|
|
|
const cmd = client.commands.get(command);
|
|
|
|
if (!cmd) return;
|
|
|
|
cmd.run(client, message, args);
|
|
|
|
};
|