From fc3e12ab7453ec052c9cb05b27d930a60c57ce7a Mon Sep 17 00:00:00 2001 From: loicbersier Date: Thu, 30 Apr 2020 03:13:46 +0200 Subject: [PATCH] guildBlacklist and not userblacklist --- event/listeners/guildCreate.js | 5 ++--- event/listeners/guildDelete.js | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/event/listeners/guildCreate.js b/event/listeners/guildCreate.js index 311d3a38..c654813b 100644 --- a/event/listeners/guildCreate.js +++ b/event/listeners/guildCreate.js @@ -1,7 +1,6 @@ const { Listener } = require('discord-akairo'); const { statsChannel } = require('../../config.json'); -const userBlacklist = require('../../models').userBlacklist; - +const guildBlacklist = require('../../models').guildBlacklist; class guildCreateListener extends Listener { constructor() { @@ -30,7 +29,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.id}}); + const blacklist = await guildBlacklist.findOne({where: {guildID:guild.id}}); if (blacklist) { guild.leave(); diff --git a/event/listeners/guildDelete.js b/event/listeners/guildDelete.js index d51b036f..292ad27c 100644 --- a/event/listeners/guildDelete.js +++ b/event/listeners/guildDelete.js @@ -1,7 +1,6 @@ const { Listener } = require('discord-akairo'); const { statsChannel } = require('../../config.json'); -const userBlacklist = require('../../models').userBlacklist; - +const guildBlacklist = require('../../models').guildBlacklist; class guildCreateListener extends Listener { constructor() { @@ -32,7 +31,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.id}}); + const blacklist = await guildBlacklist.findOne({where: {guildID:guild.id}}); if (blacklist) { guild.leave();