forked from Supositware/Haha-Yes
return if guild is not cached
This commit is contained in:
parent
705921b8d0
commit
7ad4618dd0
1 changed files with 1 additions and 0 deletions
|
@ -7,6 +7,7 @@ const { statusChannel, NODE_ENV } = process.env;
|
||||||
export default {
|
export default {
|
||||||
name: 'guildDelete',
|
name: 'guildDelete',
|
||||||
async execute(guild, client) {
|
async execute(guild, client) {
|
||||||
|
if (!guild.available) return;
|
||||||
const guildOwner = await client.users.fetch(guild.ownerId);
|
const guildOwner = await client.users.fetch(guild.ownerId);
|
||||||
|
|
||||||
const isOptOut = await db.optout.findOne({ where: { userID: guildOwner.id } });
|
const isOptOut = await db.optout.findOne({ where: { userID: guildOwner.id } });
|
||||||
|
|
Loading…
Reference in a new issue