Last active
April 17, 2018 22:39
-
-
Save jbwar22/699cd01ab4876c7d3d318e5f73633be8 to your computer and use it in GitHub Desktop.
Unban and print users
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Discord = require('discord.js'); | |
var bot = new Discord.Client(); | |
bot.on('message', message => { | |
if(message.content == '!invban'){ | |
message.guild.fetchBans().then(bans => { | |
bans.forEach(user => { | |
console.log(user.username + '#' + user.tag); | |
user.send('MESSAGE / INVITE LINK'); | |
message.guild.unban(user); | |
}); | |
}); | |
} | |
}); | |
bot.login('APP KEY'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment