Fix logging

This commit is contained in:
Jan 2020-12-27 13:04:08 +01:00
parent 19b4583d2c
commit ee908585ae

View file

@ -31,7 +31,7 @@ client.on('message', message => {
const cmd = commands.find(cmd => cmd.meta?.name == cmdName || cmd.meta?.aliases?.indexOf(cmdName) > -1); const cmd = commands.find(cmd => cmd.meta?.name == cmdName || cmd.meta?.aliases?.indexOf(cmdName) > -1);
if (!cmd) return require('./69Reply').execute(message); if (!cmd) return require('./69Reply').execute(message);
logger.info(`[CMD] ${message.author.id} ${message.author.tag} => ${cmdName}${args.length > 0 ? ',' : ''} ${args.join(' ')}`); logger.info(`[CMD] ${message.author.id} ${message.author.tag} => ${cmdName} ${args.join(' ')}`);
if (cmd.meta?.staffOnly && !message.member.permissions.has('ADMINISTRATOR')) { if (cmd.meta?.staffOnly && !message.member.permissions.has('ADMINISTRATOR')) {
logger.warn(`${message.author.tag} => Refusing to run staff command`); logger.warn(`${message.author.tag} => Refusing to run staff command`);