diff --git a/event/listeners/guildCreate.js b/event/listeners/guildCreate.js index 5cd44b9..311d3a3 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 46ad26c..d51b036 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();