mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Fix MessageEmbed copy paste (#1834)
The addField function wouldn't have errored if value wasn't a string
This commit is contained in:
@@ -172,7 +172,7 @@ class MessageEmbed {
|
||||
name = Util.resolveString(name);
|
||||
if (!String(name) || name.length > 256) throw new RangeError('EMBED_FIELD_NAME');
|
||||
value = Util.resolveString(value);
|
||||
if (!String(name) || value.length > 1024) throw new RangeError('EMBED_FIELD_VALUE');
|
||||
if (!String(value) || value.length > 1024) throw new RangeError('EMBED_FIELD_VALUE');
|
||||
this.fields.push({ name, value, inline });
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user