From 7f54af09869bc186b1bb52a7050945dfc0bd6d02 Mon Sep 17 00:00:00 2001 From: Wallace Frota <46419174+wallacefrota@users.noreply.github.com> Date: Tue, 24 Mar 2026 10:47:52 -0300 Subject: [PATCH] fix: handle undefined channelMetadata to prevent crash (#127094) * :boom: fix(Channel): handle undefined channelMetadata to prevent crash * Update Channel.js * Update Channel.js * Update Channel.js Co-authored-by: @BenyFilho * Update Channel.js Co-authored-by: @BenyFilho * Update Channel.js Co-authored-by: @BenyFilho * Update Channel.js Co-authored-by: @BenyFilho * Update Channel.js Co-authored-by: * fix: update description in Channel.js co-authored-by: @BenyFilho --------- Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com> --- src/structures/Channel.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/structures/Channel.js b/src/structures/Channel.js index 98054b1..7f4bee9 100644 --- a/src/structures/Channel.js +++ b/src/structures/Channel.js @@ -41,7 +41,8 @@ class Channel extends Base { * The channel description * @type {string} */ - this.description = data.channelMetadata.description; + this.description = + data.channelMetadata?.description ?? data.description ?? ''; /** * Indicates if it is a Channel