mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
docs: add note about idempotence to role add/remove routes (#10586)
* chore(docs): Add note about idempotence to role add/remove routes * chore: remove trailing spaces
This commit is contained in:
@@ -101,6 +101,8 @@ class GuildMemberRoleManager extends DataManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a role (or multiple roles) to the member.
|
* Adds a role (or multiple roles) to the member.
|
||||||
|
*
|
||||||
|
* <info>Uses the idempotent PUT route for singular roles, otherwise PATCHes the underlying guild member</info>
|
||||||
* @param {RoleResolvable|RoleResolvable[]|Collection<Snowflake, Role>} roleOrRoles The role or roles to add
|
* @param {RoleResolvable|RoleResolvable[]|Collection<Snowflake, Role>} roleOrRoles The role or roles to add
|
||||||
* @param {string} [reason] Reason for adding the role(s)
|
* @param {string} [reason] Reason for adding the role(s)
|
||||||
* @returns {Promise<GuildMember>}
|
* @returns {Promise<GuildMember>}
|
||||||
@@ -138,6 +140,8 @@ class GuildMemberRoleManager extends DataManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes a role (or multiple roles) from the member.
|
* Removes a role (or multiple roles) from the member.
|
||||||
|
*
|
||||||
|
* <info>Uses the idempotent DELETE route for singular roles, otherwise PATCHes the underlying guild member</info>
|
||||||
* @param {RoleResolvable|RoleResolvable[]|Collection<Snowflake, Role>} roleOrRoles The role or roles to remove
|
* @param {RoleResolvable|RoleResolvable[]|Collection<Snowflake, Role>} roleOrRoles The role or roles to remove
|
||||||
* @param {string} [reason] Reason for removing the role(s)
|
* @param {string} [reason] Reason for removing the role(s)
|
||||||
* @returns {Promise<GuildMember>}
|
* @returns {Promise<GuildMember>}
|
||||||
|
|||||||
Reference in New Issue
Block a user