This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
legacy-musicbot/events/message.js
2020-11-15 18:48:03 +01:00

21 lines
447 B
JavaScript

const config = require("../config/bot.json");
module.exports = (client, message) => {
if (message.author.bot) return;
let prefix = 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);
};