mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
Add Role.setMentionable
This commit is contained in:
@@ -237,6 +237,20 @@ class Role {
|
||||
return this.client.rest.methods.updateGuildRole(this, { permissions });
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether this role is mentionable
|
||||
* @param {boolean} mentionable Whether this role should be mentionable
|
||||
* @returns {Promise<Role>}
|
||||
* @example
|
||||
* // make the role mentionable
|
||||
* role.setMentionable(true)
|
||||
* .then(r => console.log(`Role updated ${r}`))
|
||||
* .catch(console.error);
|
||||
*/
|
||||
setMentionable(mentionable) {
|
||||
return this.client.rest.methods.updateGuildRole(this, { mentionable });
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes the role
|
||||
* @returns {Promise<Role>}
|
||||
|
||||
Reference in New Issue
Block a user