94875d6bde
also remove puppeteer so it doesnt keep installing on main instance where it's not used
24 lines
681 B
JavaScript
Executable File
24 lines
681 B
JavaScript
Executable File
module.exports = function(discordBot) {
|
|
var banlist = [];
|
|
|
|
function updateBanList() {
|
|
var homeGuild = discordBot.guilds.get("350296414720491530");
|
|
if (!homeGuild) return console.error("Couldn't find OWOP discord!");
|
|
homeGuild.fetchBans().then(bans => {
|
|
banlist = bans.keyArray();
|
|
}).catch(e => console.error("Could not fetch bans: ", e.message));
|
|
}
|
|
|
|
updateBanList();
|
|
|
|
discordBot.on("guildBanAdd", guild => {
|
|
if (guild.id == "350296414720491530") updateBanList();
|
|
});
|
|
discordBot.on("guildBanRemove", guild => {
|
|
if (guild.id == "350296414720491530") updateBanList();
|
|
});
|
|
|
|
return () => banlist;
|
|
|
|
}
|