mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
Add role mentioning (#385)
* Add role mentioning * Add to docs * Forgot to save again
This commit is contained in:
committed by
abalabahaha
parent
95e3e3e3dc
commit
b4dcd657cf
@@ -160,4 +160,14 @@ export default class Role {
|
||||
removeUser(member, callback) {
|
||||
return this.client.removeUserFromRole.apply(this.client, [member, this, callback]);
|
||||
}
|
||||
|
||||
mention(){
|
||||
if(this.mentionable)
|
||||
return `<@&${this.id}>`;
|
||||
return this.name;
|
||||
}
|
||||
|
||||
toString(){
|
||||
return this.mention();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user