Update MessagePayload.js
Reported by Dux#2925 [881113828195205131]
This commit is contained in:
parent
e9ba80a325
commit
44a7f4cb60
@ -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');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user