mirror of
https://github.com/danbulant/discord.js
synced 2026-05-24 20:42:27 +00:00
Add GuildMember.toString
This commit is contained in:
parent
47d71d32f3
commit
350c893ead
1 changed files with 11 additions and 0 deletions
|
|
@ -316,6 +316,17 @@ class GuildMember {
|
|||
return this.client.rest.methods.banGuildMember(this.guild, this, deleteDays);
|
||||
}
|
||||
|
||||
/**
|
||||
* When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.
|
||||
* @returns {string}
|
||||
* @example
|
||||
* // logs: Hello from <@123456789>!
|
||||
* console.log(`Hello from ${member}!`);
|
||||
*/
|
||||
toString() {
|
||||
return `<@${this.user.id}>`;
|
||||
}
|
||||
|
||||
// These are here only for documentation purposes - they are implemented by TextBasedChannel
|
||||
sendMessage() { return; }
|
||||
sendTTSMessage() { return; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue