mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 04:52:22 +00:00
Fix MessageEmbed copy paste (#1834)
The addField function wouldn't have errored if value wasn't a string
This commit is contained in:
parent
86ffdc38d3
commit
284f4e8ac0
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue