From eaa8445ec07c1d2619d7f4c4f7f44b52e30f7d82 Mon Sep 17 00:00:00 2001 From: Ajetunmobi Isaac <62861595+iNerdStack@users.noreply.github.com> Date: Mon, 30 Jun 2025 07:40:14 +0100 Subject: [PATCH] fix error when processing poll messages without messageSecret in channels (#3617) Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com> --- src/structures/Message.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index afb9ca7..cb1ad39 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -285,7 +285,7 @@ class Message extends Base { this.allowMultipleAnswers = Boolean(!data.pollSelectableOptionsCount); this.pollInvalidated = data.pollInvalidated; this.isSentCagPollCreation = data.isSentCagPollCreation; - this.messageSecret = Object.keys(data.messageSecret).map((key) => data.messageSecret[key]); + this.messageSecret = data.messageSecret ? Object.keys(data.messageSecret).map((key) => data.messageSecret[key]) : []; } return super._patch(data);