Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Dans le dossier events ;)
- const Discord = require('discord.js');
- const prefix = '>';
- const client = new Discord.Client({ disableEveryone: true });
- module.exports = (client, message) => {
- if (message.author.bot || message.channel.type === 'dm') { return; }
- if (!message.channel.permissionsFor(client.user).has('SEND_MESSAGES')) { return; }
- if (!message.content.startsWith(prefix)) { return; }
- let args = message.content.slice(prefix.length).trim().split(/ +/g);
- let commande = args.shift();
- let cmd = client.commands.get(commande);
- if (!cmd) { return; }
- cmd.run(client, message, args);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement