docs: Add/normalize .toString() docs on all classes (#2042)

* docs: Add/normalize .toString() examples on all classes

* docs: Remove exclamation point on ClientApplication#toString example

* docs: Normalize .toString() descriptions on all classes

* Use "returns" instead of "concatenates"
This commit is contained in:
Sanctuary
2017-10-28 14:06:26 -03:00
committed by Crawl
parent 0101392334
commit 1a8e8c7a67
10 changed files with 28 additions and 25 deletions

View File

@@ -35,11 +35,12 @@ class ReactionEmoji {
}
/**
* Creates the text required to form a graphical emoji on Discord.
* When concatenated with a string, this automatically returns the text required to form a graphical emoji on Discord
* instead of the ReactionEmoji object.
* @returns {string}
* @example
* // Send the emoji used in a reaction to the channel the reaction is part of
* reaction.message.channel.send(`The emoji used is ${reaction.emoji}`);
* @returns {string}
* reaction.message.channel.send(`The emoji used was: ${reaction.emoji}`);
*/
toString() {
return this.id ? `<:${this.name}:${this.id}>` : this.name;