mirror of
https://github.com/danbulant/discord.js
synced 2026-06-19 14:41:36 +00:00
Webpack build: 710d3db94f
This commit is contained in:
parent
b088a21c4c
commit
1bce1f09d0
2 changed files with 8 additions and 4 deletions
|
|
@ -10085,7 +10085,7 @@ class RichEmbed {
|
|||
* @param {Date} [timestamp=current date] The timestamp
|
||||
* @returns {RichEmbed} This embed
|
||||
*/
|
||||
addTimestamp(timestamp = new Date()) {
|
||||
setTimestamp(timestamp = new Date()) {
|
||||
this.timestamp = timestamp;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -10093,13 +10093,17 @@ class RichEmbed {
|
|||
/**
|
||||
* Adds a field to the embed (max 25)
|
||||
* @param {string} name The name of the field
|
||||
* @param {string} value The value of the field
|
||||
* @param {StringResolvable} value The value of the field
|
||||
* @param {boolean} [inline=false] Set the field to display inline
|
||||
* @returns {RichEmbed} This embed
|
||||
*/
|
||||
addField(name, value, inline = false) {
|
||||
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 (typeof value !== 'undefined') {
|
||||
if (value instanceof Array) value = value.join('\n');
|
||||
else if (typeof value !== 'string') value = String(value);
|
||||
}
|
||||
if (value.length > 1024) throw new RangeError('RichEmbed field values may not exceed 1024 characters.');
|
||||
this.fields.push({ name, value, inline });
|
||||
return this;
|
||||
|
|
|
|||
4
discord.indev.min.js
vendored
4
discord.indev.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue