Update MessagePayload.js

Reported by Dux#2925 [881113828195205131]
This commit is contained in:
March 7th 2022-04-17 17:20:27 +07:00
parent e9ba80a325
commit 44a7f4cb60

View File

@ -211,10 +211,10 @@ class MessagePayload {
} }
} }
// Check content // Check content
if (content.length > 2000) { if (typeof content == 'string' && content.length > 2000) {
console.warn('[WARN] Content is longer than 2000 characters.'); 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 // Max length if user has nitro boost
throw new RangeError('MESSAGE_EMBED_LINK_LENGTH'); throw new RangeError('MESSAGE_EMBED_LINK_LENGTH');
} }