From d2d7191fecd9f8feb795c0abf0d6fb2d76284163 Mon Sep 17 00:00:00 2001 From: Vitor Santos Date: Wed, 13 Dec 2023 20:14:44 -0300 Subject: [PATCH] fix(Webhook): check whether user is null during patching --- packages/discord.js/src/structures/Webhook.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/discord.js/src/structures/Webhook.js b/packages/discord.js/src/structures/Webhook.js index 266cee864c42..932f84a050e6 100644 --- a/packages/discord.js/src/structures/Webhook.js +++ b/packages/discord.js/src/structures/Webhook.js @@ -83,7 +83,7 @@ class Webhook { this.channelId = data.channel_id; } - if ('user' in data) { + if ('user' in data && data.user !== null) { /** * The owner of the webhook * @type {?(User|APIUser)}