From 3ce1bdbb6423f480831e85db030d974d01f3c3c6 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Tue, 18 Apr 2017 00:49:16 +0000 Subject: [PATCH] Nope --- commands/moderation/unban.1.js | 63 ---------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 commands/moderation/unban.1.js diff --git a/commands/moderation/unban.1.js b/commands/moderation/unban.1.js deleted file mode 100644 index 62b96f0f..00000000 --- a/commands/moderation/unban.1.js +++ /dev/null @@ -1,63 +0,0 @@ -const { Command } = require('discord.js-commando'); -const { RichEmbed } = require('discord.js'); - -module.exports = class Unban1Command extends Command { - constructor(client) { - super(client, { - name: 'unban1', - aliases: [ - 'unbanne1' - ], - group: 'moderation', - memberName: 'unban1', - description: 'Unbans a user (TEST). (;unban USERID not being a jerk.)', - examples: [';unban USERID not being a jerk.'], - guildOnly: true, - args: [{ - key: 'member', - prompt: 'What member do you want to unban? Please enter the ID of the user.', - type: 'user' - }, { - key: 'reason', - prompt: 'What do you want to set the reason as?', - type: 'string', - validate: reason => { - if (reason.length < 141) { - return true; - } - return 'Please keep your reason under 140 characters.'; - } - }] - }); - } - - hasPermission(msg) { - return this.client.isOwner(msg.author); - } - - async run(message, args) { - if (message.channel.type !== 'dm') { - if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return; - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return message.say(':x: Error! I don\'t have the Embed Links Permission!'); - if (!message.channel.permissionsFor(this.client.user).hasPermission('BAN_MEMBERS')) return message.say(':x: Error! I don\'t have the Ban Members Permission!'); - } - if (!message.guild.channels.exists('name', 'mod_logs')) return message.say(':x: Error! Could not find the mod_logs channel! Please create it!'); - const memberID = args.memberID; - const reason = args.reason; - const bans = await message.guild.fetchBans(); - if (!bans.has(memberID)) return message.say(':x: Error! Could not find this user in the bans.'); - const unbanUser = await bans.get(memberID); - try { - await message.guild.unban(unbanUser); - await message.say(':ok_hand:'); - const embed = new RichEmbed() - .setAuthor(message.author.tag, message.author.avatarURL) - .setColor(0x00AE86) - .setTimestamp() - .setDescription(`**Member:** ${unbanUser.tag} (${unbanUser.id})\n**Action:** Unban\n**Reason:** ${reason}`); - return message.guild.channels.find('name', 'mod_logs').send({embed}); - } catch (err) { - return message.say(':x: Error! Something went wrong!'); - } - } -};