From 15983a8cdccffb085253f6c0fa03679fc5c2ce02 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Mon, 27 Apr 2020 19:39:40 +0200 Subject: [PATCH 1/2] Fix the blacklist search --- commands/owner/serverblacklist.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}; From 5850bebad3805daf72ee5c4acee7c6fd7e4102e8 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Mon, 27 Apr 2020 19:44:44 +0200 Subject: [PATCH 2/2] 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 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();