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