mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
Add GuildMember.toString
This commit is contained in:
@@ -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; }
|
||||||
|
|||||||
Reference in New Issue
Block a user