mirror of
https://github.com/danbulant/discord.js
synced 2026-05-26 13:32:04 +00:00
Merge branch 'indev-rewrite' of https://github.com/hydrabolt/discord.js into indev-rewrite
This commit is contained in:
commit
e47f3dda94
1 changed files with 5 additions and 5 deletions
|
|
@ -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}
|
||||
* @example
|
||||
* // Outputs: Hello from general
|
||||
* // Outputs: Hello from #general
|
||||
* console.log(`Hello from ${channel}`);
|
||||
* @example
|
||||
* // Outputs: Hello from general
|
||||
* console.log('Hello from ' + ${channel});
|
||||
* // Outputs: Hello from #general
|
||||
* console.log('Hello from ' + channel);
|
||||
*/
|
||||
toString() {
|
||||
return this.name;
|
||||
return `<#${this.id}>`;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue