diff --git a/events/message.js b/events/message.js new file mode 100644 index 0000000..ef4250b --- /dev/null +++ b/events/message.js @@ -0,0 +1,13 @@ +module.exports = (client, message) => { + + if (message.author.bot) return; + if (message.content.indexOf("-") !== 0) return; + + const args = message.content.slice(1).trim().split(/ +/g); + const command = args.shift().toLowerCase(); + const cmd = client.commands.get(command); + + if (!cmd) return; + cmd.run(client, message, args); + +};