aboutsummaryrefslogtreecommitdiff
path: root/commands/ban.js
diff options
context:
space:
mode:
authorAlee <alee14498@gmail.com>2018-03-25 09:36:32 -0400
committerAlee <alee14498@gmail.com>2018-03-25 09:36:32 -0400
commit9f39777642b3f44386df711afeab6490dc508007 (patch)
tree90789522e4920934ff0012129525c18c6768953b /commands/ban.js
parent07fe0f9f68d078881c44ddeaadbf09212f089727 (diff)
downloadAleeBot-9f39777642b3f44386df711afeab6490dc508007.tar.gz
AleeBot-9f39777642b3f44386df711afeab6490dc508007.tar.bz2
AleeBot-9f39777642b3f44386df711afeab6490dc508007.zip
Moved all source files
Diffstat (limited to 'commands/ban.js')
-rw-r--r--commands/ban.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/commands/ban.js b/commands/ban.js
new file mode 100644
index 0000000..a8d5c6a
--- /dev/null
+++ b/commands/ban.js
@@ -0,0 +1,23 @@
+module.exports.run = async (client, message, args) => {
+ let 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.")
+ 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}`
+ });
+ message.reply("User Banned!");
+};
+
+exports.conf = {
+ aliases: [],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'ban',
+ description: 'Bans a member',
+ usage: 'ban [user] [time]',
+ category: '- Moderation Commands',
+};