Merge remote-tracking branch 'origin/master'

This commit is contained in:
rhearmas 2019-12-23 20:23:06 -05:00
commit d49036e6ec

View file

@ -1,11 +1,10 @@
module.exports = async (client, message) => { module.exports = async (client, message) => {
if (message.author.bot) return; if (message.author.bot) return;
const settings = message.settings = client.getSettings(message.guild); const settings = message.settings = client.getSettings(message.guild);
const prefixMention = new RegExp(`^<@!?${client.user.id}>( |)$`); const prefixMention = new RegExp(`^<@!?${client.user.id}>( |)$`);
if (message.content.match(prefixMention)) { if (message.content.match(prefixMention)) {
return message.reply(`My prefix on this guild is \`${settings.prefix}\``); return message.reply(`my prefix for this guild is \`${settings.prefix}\``);
} }
if (message.content.indexOf(settings.prefix) !== 0) return; if (message.content.indexOf(settings.prefix) !== 0) return;
@ -39,6 +38,7 @@ module.exports = async (client, message) => {
while (args[0] && args[0][0] === "-") { while (args[0] && args[0][0] === "-") {
message.flags.push(args.shift().slice(1)); message.flags.push(args.shift().slice(1));
} }
client.logger.cmd(`[CMD] ${client.config.permLevels.find(l => l.level === level).name} ${message.author.username} (${message.author.id}) ran command ${cmd.help.name}`); client.logger.cmd(`[CMD] ${client.config.permLevels.find(l => l.level === level).name} ${message.author.username} (${message.author.id}) ran command ${cmd.help.name}`);
cmd.run(client, message, args, level); cmd.run(client, message, args, level);
}; };