mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13: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:
@@ -332,8 +332,11 @@ class Role extends Base {
|
||||
}
|
||||
|
||||
/**
|
||||
* When concatenated with a string, this automatically concatenates the role mention rather than the Role object.
|
||||
* When concatenated with a string, this automatically returns the role's mention instead of the Role object.
|
||||
* @returns {string}
|
||||
* @example
|
||||
* // Logs: Role: <@&123456789012345678>
|
||||
* console.log(`Role: ${role}`);
|
||||
*/
|
||||
toString() {
|
||||
if (this.id === this.guild.id) return '@everyone';
|
||||
|
||||
Reference in New Issue
Block a user