diff --git a/commands/Moderation/unban.js b/commands/Moderation/unban.js new file mode 100644 index 0000000..58d4853 --- /dev/null +++ b/commands/Moderation/unban.js @@ -0,0 +1,25 @@ +exports.run = async (client, message, args, level) => { + const reason = args.slice(1).join(' '); + client.unbanReason = reason; + client.unbanAuth = message.author; + const user = args[0]; + const modlog = client.channels.find('name', config.modLogChannel); + if (!modlog) return message.reply('I could not find a valid modlog channel.'); + if (reason.length < 1) return message.reply('You must supply a reason for the unban.'); + if (!user) return message.reply('You must supply a User Resolvable, such as a user id.').catch(console.error); + message.guild.unban(user); +}; + +exports.conf = { + enabled: true, + guildOnly: false, + aliases: [], + permLevel: "Administrator" +}; + +exports.help = { + name: "unban", + category: "Moderation", + description: "Unbans a specified user.", + usage: "unban " +}; \ No newline at end of file