refactor: improve the accuracy of docs/improve docs (#4845)

Co-authored-by: Noel <icrawltogo@gmail.com>
This commit is contained in:
Sugden
2020-10-17 14:53:02 +01:00
committed by GitHub
parent 4bbe716aa0
commit af670fc718
22 changed files with 185 additions and 166 deletions

View File

@@ -29,37 +29,37 @@ class MessageEmbed {
* * `link` - a link embed
* @type {string}
*/
this.type = data.type;
this.type = data.type || 'rich';
/**
* The title of this embed
* @type {?string}
*/
this.title = data.title;
this.title = 'title' in data ? data.title : null;
/**
* The description of this embed
* @type {?string}
*/
this.description = data.description;
this.description = 'description' in data ? data.description : null;
/**
* The URL of this embed
* @type {?string}
*/
this.url = data.url;
this.url = 'url' in data ? data.url : null;
/**
* The color of this embed
* @type {?number}
*/
this.color = Util.resolveColor(data.color);
this.color = 'color' in data ? Util.resolveColor(data.color) : null;
/**
* The timestamp of this embed
* @type {?number}
*/
this.timestamp = data.timestamp ? new Date(data.timestamp).getTime() : null;
this.timestamp = 'timestamp' in data ? new Date(data.timestamp).getTime() : null;
/**
* Represents a field of a MessageEmbed
@@ -331,7 +331,7 @@ class MessageEmbed {
*/
setFooter(text, iconURL) {
text = Util.resolveString(text);
this.footer = { text, iconURL, proxyIconURL: undefined };
this.footer = { text, iconURL };
return this;
}