Fix MessageEmbed copy paste (#1834)

The addField function wouldn't have errored if value wasn't a string
This commit is contained in:
Frangu Vlad
2017-08-26 12:03:44 +03:00
committed by Amish Shah
parent 86ffdc38d3
commit 284f4e8ac0

View File

@@ -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;
}