From 3e625b020be3328ce0a569a2196d789a309c2b7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= <loic@loics-macbook-pro.home>
Date: Tue, 13 Nov 2018 20:24:23 +0100
Subject: [PATCH] Can unban user

---
 commands/admin/unban.js | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 commands/admin/unban.js

diff --git a/commands/admin/unban.js b/commands/admin/unban.js
new file mode 100644
index 00000000..9f10beff
--- /dev/null
+++ b/commands/admin/unban.js
@@ -0,0 +1,26 @@
+const { Command } = require('discord.js-commando');
+module.exports = class UnbanCommand extends Command {
+    constructor(client) {
+        super(client, {
+            name: 'unban',
+            group: 'admin',
+            memberName: 'unban',
+            description: 'unban the provided id',
+            guildOnly: true,
+            clientPermissions: ['BAN_MEMBERS'],
+            userPermissions: ['BAN_MEMBERS'],
+            args: [
+                {
+                    key: 'member',
+                    prompt: 'Wich member would you like to unban?',
+                    type: 'user',
+                }
+            ]
+        });
+    }
+
+    async run(message, { member }) {
+        message.guild.unban(member)
+            .then(() => message.reply(`user was succesfully unbanned.`));
+        };
+};
\ No newline at end of file