summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlee <alee14498@gmail.com>2018-04-26 18:08:15 -0400
committerAlee <alee14498@gmail.com>2018-04-26 18:08:15 -0400
commitb17bd4033cd1f9db997b5619bde85af3ba4ce9a7 (patch)
treea69fda6dc7f5866f235cb5146cf584735dbe8e29
parent9bc1531dea6893dcfd59aa0269de4a76d0cb6b1b (diff)
downloadAleeBot-b17bd4033cd1f9db997b5619bde85af3ba4ce9a7.tar.gz
AleeBot-b17bd4033cd1f9db997b5619bde85af3ba4ce9a7.tar.bz2
AleeBot-b17bd4033cd1f9db997b5619bde85af3ba4ce9a7.zip
Embed in ban and kick
-rw-r--r--commands/ban.js8
-rw-r--r--commands/changelog.js2
-rw-r--r--commands/kick.js10
-rw-r--r--storage/settings.json2
4 files changed, 17 insertions, 5 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 = {
diff --git a/commands/changelog.js b/commands/changelog.js
index 2849d8d..cca1475 100644
--- a/commands/changelog.js
+++ b/commands/changelog.js
@@ -22,7 +22,7 @@ module.exports.run = async (client, message) => {
const embed = new Discord.RichEmbed()
.setAuthor('AleeBot ' + require('../storage/settings.json').abVersion + ' Changelog', 'https://cdn.discordapp.com/avatars/282547024547545109/6c147a444ae328c38145ef1f74169e38.png?size=2048')
.setDescription('What\'s new in AleeBot '+ require('../storage/settings.json').abVersion +'?')
- .addField('1. Console commands!', 'Unfortunately they are not discord features but it\'s only for console.')
+ .addField('1. Minor changes in ban and kick!', 'We now have embeds in ban and kick...')
.setColor('#1fd619');
message.channel.send({embed});
diff --git a/commands/kick.js b/commands/kick.js
index 63904c1..2cf596e 100644
--- a/commands/kick.js
+++ b/commands/kick.js
@@ -18,14 +18,20 @@
*
* *************************************/
module.exports.run = async (client, message, args) => {
+ const Discord = require('discord.js');
const mreason = args.join(" ").slice(22);
if (!message.member.permissions.has('KICK_MEMBERS')) return message.reply("It looks like that you don't have the permissions to ban people.");
if (!message.guild.member(client.user).hasPermission('KICK_MEMBERS')) return message.reply('Uhh... I don\'t have permission to kick members.');
const member = message.mentions.members.first();
if (!member) return message.reply("Uhh... Please mention a member first.");
member.kick(`Kicked by: ${message.author.tag} Reason: ` + mreason);
- message.reply(`**${member.user.tag}** has been kicked for the reason: \n\`\`\`${mreason}.\`\`\`\n`);
-};
+ const embed = new Discord.RichEmbed()
+ .setTitle('User Kicked!')
+ .setColor('#1fd619')
+ .addField('**User:**', `${member.user.tag}`)
+ .addField('**Reason:**', `\`\`\`${mreason}\`\`\``)
+ await message.channel.send({ embed });
+ };
exports.conf = {
aliases: [],
diff --git a/storage/settings.json b/storage/settings.json
index c223b8a..0f4bfae 100644
--- a/storage/settings.json
+++ b/storage/settings.json
@@ -1,4 +1,4 @@
{
- "abVersion": "2.9.1",
+ "abVersion": "2.9.2",
"prefix": "ab:"
}