diff --git a/src/structures/Channel.js b/src/structures/Channel.js index 04867b118..833d9ef12 100644 --- a/src/structures/Channel.js +++ b/src/structures/Channel.js @@ -52,6 +52,17 @@ class Channel extends Base { return new Date(this.createdTimestamp); } + /** + * When concatenated with a string, this automatically returns the channel's mention instead of the Channel object. + * @returns {string} + * @example + * // Logs: Hello from <#123456789012345678>! + * console.log(`Hello from ${channel}!`); + */ + toString() { + return `<#${this.id}>`; + } + /** * Deletes this channel. * @returns {Promise} diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 0862f1455..25c26274b 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -489,17 +489,6 @@ class GuildChannel extends Channel { return MessageNotificationTypes[3]; } } - - /** - * When concatenated with a string, this automatically returns the channel's mention instead of the Channel object. - * @returns {string} - * @example - * // Logs: Hello from <#123456789012345678>! - * console.log(`Hello from ${channel}!`); - */ - toString() { - return `<#${this.id}>`; - } } module.exports = GuildChannel;