aboutsummaryrefslogtreecommitdiff
path: root/commands/ban.js
diff options
context:
space:
mode:
Diffstat (limited to 'commands/ban.js')
-rw-r--r--commands/ban.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/commands/ban.js b/commands/ban.js
index cf8b14c..c1129de 100644
--- a/commands/ban.js
+++ b/commands/ban.js
@@ -18,13 +18,19 @@
*
* *************************************/
module.exports.run = async (client, message, args) => {
+ const Discord = require('discord.js');
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(`Banned by ${message.author.tag} Reason: ` + mreason);
- message.reply(`**${member.user.tag}** has been banned for the reason: \n\`\`\`${mreason}.\`\`\`\n`);
+ const embed = new Discord.RichEmbed()
+ .setTitle('User Banned!')
+ .setColor('#1fd619')
+ .addField('**User:**', `${member.user.tag}`)
+ .addField('**Reason:**', `\`\`\`${mreason}\`\`\``)
+ await message.channel.send({ embed });
};
exports.conf = {