diff --git a/src/structures/ClientApplication.js b/src/structures/ClientApplication.js index 494d8c1c3..ccca3f7e0 100644 --- a/src/structures/ClientApplication.js +++ b/src/structures/ClientApplication.js @@ -195,8 +195,12 @@ class ClientApplication extends Base { } /** - * When concatenated with a string, this automatically concatenates the app name rather than the app object. + * When concatenated with a string, this automatically returns the application's name instead of the + * ClientApplication object. * @returns {string} + * @example + * // Logs: Application name: My App + * console.log(`Application name: ${application}`); */ toString() { return this.name; diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index cdd4d2db8..fe6ba57c6 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -27,9 +27,12 @@ class DMChannel extends Channel { } /** - * When concatenated with a string, this automatically concatenates the recipient's mention instead of the - * DM channel object. + * When concatenated with a string, this automatically returns the recipient's mention instead of the + * DMChannel object. * @returns {string} + * @example + * // Logs: Hello from <@123456789012345678>! + * console.log(`Hello from ${channel}!`); */ toString() { return this.recipient.toString(); diff --git a/src/structures/Emoji.js b/src/structures/Emoji.js index 4b1ea2680..d1cca2843 100644 --- a/src/structures/Emoji.js +++ b/src/structures/Emoji.js @@ -190,7 +190,7 @@ class Emoji extends Base { } /** - * When concatenated with a string, this automatically returns the emoji mention rather than the object. + * When concatenated with a string, this automatically concatenates the emoji's mention instead of the Emoji object. * @returns {string} * @example * // Send an emoji: diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index e142b070d..2ade06b06 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -203,14 +203,12 @@ class GroupDMChannel extends Channel { } /** - * When concatenated with a string, this automatically concatenates the channel's name instead of the Channel object. + * When concatenated with a string, this automatically returns the channel's name instead of the + * GroupDMChannel object. * @returns {string} * @example * // Logs: Hello from My Group DM! * console.log(`Hello from ${channel}!`); - * @example - * // Logs: Hello from My Group DM! - * console.log(`Hello from ' + channel + '!'); */ toString() { return this.name; diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 1b9463b51..73adbe1df 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -1123,14 +1123,11 @@ class Guild extends Base { } /** - * When concatenated with a string, this automatically concatenates the guild's name instead of the guild object. + * When concatenated with a string, this automatically returns the guild's name instead of the Guild object. * @returns {string} * @example * // Logs: Hello from My Guild! * console.log(`Hello from ${guild}!`); - * @example - * // Logs: Hello from My Guild! - * console.log('Hello from ' + guild + '!'); */ toString() { return this.name; diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index a1e8d53a0..896e2bdf8 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -493,11 +493,8 @@ class GuildChannel extends Channel { * When concatenated with a string, this automatically returns the channel's mention instead of the Channel object. * @returns {string} * @example - * // Outputs: Hello from #general - * console.log(`Hello from ${channel}`); - * @example - * // Outputs: Hello from #general - * console.log('Hello from ' + channel); + * // Logs: Hello from <#123456789012345678>! + * console.log(`Hello from ${channel}!`); */ toString() { return `<#${this.id}>`; diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 010775e29..7ab2597fd 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -529,10 +529,10 @@ class GuildMember extends Base { } /** - * When concatenated with a string, this automatically concatenates the user's mention instead of the Member object. + * When concatenated with a string, this automatically returns the user's mention instead of the GuildMember object. * @returns {string} * @example - * // Logs: Hello from <@123456789>! + * // Logs: Hello from <@123456789012345678>! * console.log(`Hello from ${member}!`); */ toString() { diff --git a/src/structures/ReactionEmoji.js b/src/structures/ReactionEmoji.js index f550544c6..94ea38930 100644 --- a/src/structures/ReactionEmoji.js +++ b/src/structures/ReactionEmoji.js @@ -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; diff --git a/src/structures/Role.js b/src/structures/Role.js index eb60185db..39c28e11b 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -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'; diff --git a/src/structures/User.js b/src/structures/User.js index 859cdeeb2..001a999be 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -248,10 +248,10 @@ class User extends Base { } /** - * When concatenated with a string, this automatically concatenates the user's mention instead of the User object. + * When concatenated with a string, this automatically returns the user's mention instead of the User object. * @returns {string} * @example - * // logs: Hello from <@123456789>! + * // Logs: Hello from <@123456789012345678>! * console.log(`Hello from ${user}!`); */ toString() {