mirror of
https://github.com/danbulant/discord.js
synced 2026-06-17 21:51:20 +00:00
fix(Actions): Avoid crash in InviteCreate with unknown channel (#4882)
This commit is contained in:
parent
937153a92f
commit
dd12912124
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue