Made GuildChannel.toString return a mention (#543)

This commit is contained in:
Schuyler Cebulskie
2016-08-26 17:57:08 -04:00
committed by Amish Shah
parent 642d768cdc
commit b1772089d1

View File

@@ -263,17 +263,17 @@ class GuildChannel extends Channel {
} }
/** /**
* When concatenated with a String, this automatically returns the Channel's name instead of the Channel object. * When concatenated with a String, this automatically returns the Channel's mention instead of the Channel object.
* @returns {String} * @returns {String}
* @example * @example
* // Outputs: Hello from general * // Outputs: Hello from #general
* console.log(`Hello from ${channel}`); * console.log(`Hello from ${channel}`);
* @example * @example
* // Outputs: Hello from general * // Outputs: Hello from #general
* console.log('Hello from ' + ${channel}); * console.log('Hello from ' + channel);
*/ */
toString() { toString() {
return this.name; return `<#${this.id}>`;
} }
} }