mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user