mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
docs(Role): Fix example for comparePositionTo() (#9270)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -193,7 +193,7 @@ class Role extends Base {
|
|||||||
* @param {RoleResolvable} role Role to compare to this one
|
* @param {RoleResolvable} role Role to compare to this one
|
||||||
* @returns {number} Negative number if this role's position is lower (other role's is higher),
|
* @returns {number} Negative number if this role's position is lower (other role's is higher),
|
||||||
* positive number if this one is higher (other's is lower), 0 if equal
|
* positive number if this one is higher (other's is lower), 0 if equal
|
||||||
* * @example
|
* @example
|
||||||
* // Compare the position of a role to another
|
* // Compare the position of a role to another
|
||||||
* const roleCompare = role.comparePositionTo(otherRole);
|
* const roleCompare = role.comparePositionTo(otherRole);
|
||||||
* if (roleCompare === 1) console.log(`${role.name} is higher than ${otherRole.name}`);
|
* if (roleCompare === 1) console.log(`${role.name} is higher than ${otherRole.name}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user