diff options
| author | Alee <alee14498@gmail.com> | 2018-03-25 14:39:58 -0400 |
|---|---|---|
| committer | Alee <alee14498@gmail.com> | 2018-03-25 14:39:58 -0400 |
| commit | 5764b61a0f8a715cfa06d98ef82f577ad9fc8e29 (patch) | |
| tree | 579b1353c0d18a9f23ec7862eefe7e96cb2d3cea /commands/ban.js | |
| parent | aefb6746d57910b850b603a9ccf8dfc37e756af6 (diff) | |
| download | AleeBot-5764b61a0f8a715cfa06d98ef82f577ad9fc8e29.tar.gz AleeBot-5764b61a0f8a715cfa06d98ef82f577ad9fc8e29.tar.bz2 AleeBot-5764b61a0f8a715cfa06d98ef82f577ad9fc8e29.zip | |
Added reasons to ban and kick, removed days
Diffstat (limited to 'commands/ban.js')
| -rw-r--r-- | commands/ban.js | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/commands/ban.js b/commands/ban.js index f3e88dd..d2e78a2 100644 --- a/commands/ban.js +++ b/commands/ban.js @@ -23,16 +23,13 @@ * SOFTWARE. ********************************/ module.exports.run = async (client, message, args) => { - let mreason = args.join(" ").slice(22); - + const mreason = args.join(" ").slice(22); if (!message.member.permissions.has('BAN_MEMBERS')) return message.reply("It looks like that you don't have the permissions to ban people.") + if (!message.guild.member(client.user).hasPermission('BAN_MEMBERS')) return message.reply('Uhh... I don\'t have permission to ban members.'); const member = message.mentions.members.first(); if (!member) return message.reply("Uhh... Please mention a member first."); - member.ban({ - days: args[1] || null, - reason: `Banned by ${message.author.tag} ${mreason}` - }); - message.reply("User Banned! Reason: " + mreason); + member.ban(`Banned by ${message.author.tag} Reason: ` + mreason); + message.reply(member.user.tag + " has been banned! Reason: " + mreason); }; exports.conf = { |
