docs: fix compare position example (#9272)

Update Role.js

Co-authored-by: space <spaceeec@yahoo.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Jaw0r3k
2023-04-02 00:37:18 +02:00
committed by GitHub
parent de1aac674a
commit d16114c526

View File

@@ -196,7 +196,7 @@ class Role extends Base {
* @example
* // Compare the position of a role to another
* 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}`);
*/
comparePositionTo(role) {
return this.guild.roles.comparePositions(this, role);