diff --git a/commands/owner/serverblacklist.js b/commands/owner/serverblacklist.js index 3673979..7d62c9f 100644 --- a/commands/owner/serverblacklist.js +++ b/commands/owner/serverblacklist.js @@ -27,7 +27,7 @@ class serverBlacklistCommand extends Command { } async exec(message, args) { - const blacklist = await guildBlacklist.findOne({where: {guildID:message.author.id}}); + const blacklist = await guildBlacklist.findOne({where: {guildID:args.guildID}}); if (!blacklist) { const body = {guildID: args.guildID}; 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();