mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
makeContent should accept empty strings (#7764)
This commit is contained in:
@@ -71,7 +71,7 @@ const Messages = {
|
||||
|
||||
MESSAGE_BULK_DELETE_TYPE: 'The messages must be an Array, Collection, or number.',
|
||||
MESSAGE_NONCE_TYPE: 'Message nonce must be an integer or a string.',
|
||||
MESSAGE_CONTENT_TYPE: 'Message content must be a non-empty string.',
|
||||
MESSAGE_CONTENT_TYPE: 'Message content must be a string.',
|
||||
|
||||
SPLIT_MAX_LEN: 'Chunk exceeds the max length and contains no split characters.',
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ class MessagePayload {
|
||||
if (this.options.content === null) {
|
||||
content = '';
|
||||
} else if (typeof this.options.content !== 'undefined') {
|
||||
content = Util.verifyString(this.options.content, RangeError, 'MESSAGE_CONTENT_TYPE', false);
|
||||
content = Util.verifyString(this.options.content, RangeError, 'MESSAGE_CONTENT_TYPE', true);
|
||||
}
|
||||
|
||||
return content;
|
||||
|
||||
Reference in New Issue
Block a user