This commit is contained in:
Travis CI 2016-12-06 01:34:41 +00:00
parent ebe5e9d5f6
commit 0ef80b49cf
2 changed files with 11 additions and 6 deletions

View file

@ -9988,6 +9988,7 @@ class RichEmbed {
* @returns {RichEmbed} This embed
*/
setTitle(title) {
if (title.length > 256) throw new RangeError('RichEmbed titles may not exceed 256 characters.');
this.title = title;
return this;
}
@ -9998,6 +9999,7 @@ class RichEmbed {
* @returns {RichEmbed} This embed
*/
setDescription(description) {
if (description.length > 2048) throw new RangeError('RichEmbed descriptions may not exceed 2048 characters.');
this.description = description;
return this;
}
@ -10056,7 +10058,9 @@ class RichEmbed {
* @returns {RichEmbed} This embed
*/
addField(name, value, inline = false) {
if (this.fields.length >= 25) throw new RangeError('A RichEmbed may only have a maximum of 25 fields.');
if (this.fields.length >= 25) throw new RangeError('RichEmbeds may not exceed 25 fields.');
if (name.length > 256) throw new RangeError('RichEmbed field names may not exceed 256 characters.');
if (value.length > 1024) throw new RangeError('RichEmbed field values may not exceed 1024 characters.');
this.fields.push({ name, value, inline });
return this;
}
@ -10088,6 +10092,7 @@ class RichEmbed {
* @returns {RichEmbed} This embed
*/
setFooter(text, icon) {
if (text.length > 2048) throw new RangeError('RichEmbed footer text may not exceed 1024 characters.');
this.footer = { text, icon_url: icon };
return this;
}

10
discord.indev.min.js vendored

File diff suppressed because one or more lines are too long