Add files via upload

This commit is contained in:
2021-08-18 00:12:37 -07:00
committed by GitHub
parent ecd6246099
commit 9d759573d2
55 changed files with 3098 additions and 0 deletions

18
bot/commands/unbanIP.js Normal file
View File

@ -0,0 +1,18 @@
module.exports = {
command: 'unbanip',
description: 'Unban an IP Address from your service',
syntax: '{PREFIX}unbanip [IP_ADDRESS]',
execute: async (_this, msg, args) => {
if (!args.join(' ')) return msg.channel.createMessage('No arguments were given');
const ipAddress = args.join(' ');
const exists = _this.db.get('bans').find({ ip: ipAddress }).value();
if (exists === undefined) {
msg.channel.createMessage('This IP Address is not banned');
} else {
msg.channel.createMessage(`Removing ban for IP \`${ipAddress}\`...`);
_this.db.get('bans')
.remove({ ip: ipAddress })
.write();
}
},
};