mirror of
https://github.com/danbulant/discord.js
synced 2026-06-08 09:13:22 +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);
|
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
|
// These are here only for documentation purposes - they are implemented by TextBasedChannel
|
||||||
sendMessage() { return; }
|
sendMessage() { return; }
|
||||||
sendTTSMessage() { return; }
|
sendTTSMessage() { return; }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue