mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(Actions): Avoid crash in InviteCreate with unknown channel (#4882)
This commit is contained in:
committed by
GitHub
parent
937153a92f
commit
dd12912124
@@ -9,7 +9,7 @@ class InviteCreateAction 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);
|
||||
|
||||
Reference in New Issue
Block a user