From 44a7f4cb605a1dbb1162caa503f42b5147aa8134 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Sun, 17 Apr 2022 17:20:27 +0700 Subject: [PATCH] Update MessagePayload.js Reported by Dux#2925 [881113828195205131] --- src/structures/MessagePayload.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/MessagePayload.js b/src/structures/MessagePayload.js index 61d83e5..387f4a7 100644 --- a/src/structures/MessagePayload.js +++ b/src/structures/MessagePayload.js @@ -211,10 +211,10 @@ class MessagePayload { } } // Check content - if (content.length > 2000) { + if (typeof content == 'string' && content.length > 2000) { console.warn('[WARN] Content is longer than 2000 characters.'); } - if (content.length > 4000) { + if (typeof content == 'string' && content.length > 4000) { // Max length if user has nitro boost throw new RangeError('MESSAGE_EMBED_LINK_LENGTH'); }