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();