From 5850bebad3805daf72ee5c4acee7c6fd7e4102e8 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Mon, 27 Apr 2020 19:44:44 +0200 Subject: [PATCH] Fix the blacklist thing --- event/listeners/guildCreate.js | 2 +- event/listeners/guildDelete.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/event/listeners/guildCreate.js b/event/listeners/guildCreate.js index 5cd44b91..311d3a38 100644 --- a/event/listeners/guildCreate.js +++ b/event/listeners/guildCreate.js @@ -30,7 +30,7 @@ class guildCreateListener extends Listener { .setFooter(`I'm now in ${this.client.guilds.cache.size} servers!`) .setTimestamp(); - const blacklist = await userBlacklist.findOne({where: {userID:guild.owner.id}}); + const blacklist = await userBlacklist.findOne({where: {userID:guild.id}}); if (blacklist) { guild.leave(); diff --git a/event/listeners/guildDelete.js b/event/listeners/guildDelete.js index 46ad26cb..d51b036f 100644 --- a/event/listeners/guildDelete.js +++ b/event/listeners/guildDelete.js @@ -32,7 +32,7 @@ class guildCreateListener extends Listener { .setFooter(`I'm now in ${this.client.guilds.cache.size} servers!`) .setTimestamp(); - const blacklist = await userBlacklist.findOne({where: {userID:guild.owner.id}}); + const blacklist = await userBlacklist.findOne({where: {userID:guild.id}}); if (blacklist) { guild.leave();