From fa3be4a7e760be3f688be57f72a9d9a4b981e8f7 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 3 Apr 2018 20:32:31 -0400 Subject: [PATCH] Updated commands for properly outputting the ban message to the channel, not the admin log. --- src/commands/ban.js | 2 +- src/commands/clearWarnings.js | 4 ++-- src/commands/warn.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commands/ban.js b/src/commands/ban.js index 39ea2bd..91cfe8e 100644 --- a/src/commands/ban.js +++ b/src/commands/ban.js @@ -8,7 +8,7 @@ exports.command = function (message) { message.mentions.users.map((user) => { var count = state.warnings.filter(x => x.id === user.id && !x.cleared).length || 0; - message.channel.send(`${user} ${user.username}, You will now be banned from this channel.`); + message.channel.send(`${user}, You will now be banned from this server.`); logger.info(`${message.author.toString()} has banned ${user.toString()} ${user} ${user.username}.`); state.logChannel.send(`${message.author} has banned ${user} ${user.username} [${count}].`); diff --git a/src/commands/clearWarnings.js b/src/commands/clearWarnings.js index 2a8a683..815b9a4 100644 --- a/src/commands/clearWarnings.js +++ b/src/commands/clearWarnings.js @@ -14,7 +14,7 @@ exports.command = function (message) { message.channel.send(`${user}, you have no warnings to clear.`); } - logger.info(`${message.author.toString()} has cleared all warnings for ${user.toString()} [${count}].`); - state.logChannel.send(`${message.author.toString()} has cleared all warnings for ${user.toString()} [${count}].`); + logger.info(`${message.author.toString()} has cleared all warnings for ${user.toString()} [${count.length}].`); + state.logChannel.send(`${message.author.toString()} has cleared all warnings for ${user.toString()} [${count.length}].`); }); }; diff --git a/src/commands/warn.js b/src/commands/warn.js index f729603..8b1ad7b 100644 --- a/src/commands/warn.js +++ b/src/commands/warn.js @@ -18,7 +18,7 @@ exports.command = function (message) { state.stats.warnings += 1; if (count + 1 >= 3) { - state.logChannel.send(`.ban ${user}`); + message.channel.send(`.ban ${user}`); } }); };