diff options
| author | Alee <alee14498@gmail.com> | 2018-03-24 21:13:57 -0400 |
|---|---|---|
| committer | Alee <alee14498@gmail.com> | 2018-03-24 21:13:57 -0400 |
| commit | b097f009e3176e5e4853d3ffdeee27428fc84166 (patch) | |
| tree | 00176b71166fb37bac5b5294e34ea4bf390f4e5f /src/commands/ban.js | |
| parent | c962e66e6b3b84e057980455da9b2ea81388969c (diff) | |
| download | AleeBot-b097f009e3176e5e4853d3ffdeee27428fc84166.tar.gz AleeBot-b097f009e3176e5e4853d3ffdeee27428fc84166.tar.bz2 AleeBot-b097f009e3176e5e4853d3ffdeee27428fc84166.zip | |
Moderation features and 2.2 release
Diffstat (limited to 'src/commands/ban.js')
| -rw-r--r-- | src/commands/ban.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/commands/ban.js b/src/commands/ban.js new file mode 100644 index 0000000..a8d5c6a --- /dev/null +++ b/src/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', +}; |
