fix(InviteDelete): guild can be missing (#5457)

This commit is contained in:
Souji
2021-03-31 22:31:37 +02:00
committed by iCrawl
parent 8e8d9b490a
commit 7efc295415

View File

@@ -9,7 +9,7 @@ class InviteDeleteAction extends Action {
const client = this.client;
const channel = client.channels.cache.get(data.channel_id);
const guild = client.guilds.cache.get(data.guild_id);
if (!channel && !guild) return false;
if (!channel) return false;
const inviteData = Object.assign(data, { channel, guild });
const invite = new Invite(client, inviteData);