@antiraid-ext/utils/rolecmp
API reference for @antiraid-ext/utils/rolecmp
@antiraid-ext/utils/rolecmp
Functions
IsRoleALessThanRoleB
Returns if A is lower than B in hierarchy order.
Function Signature
--- Returns if A is lower than B in hierarchy order.
---
--- @param a discord.GuildRoleObject Role A
--- @param b discord.GuildRoleObject Role B
--- @return boolean \`\`true\`\` if A is lower than B in hierarchy order, \`\`false\`\` otherwise.
function IsRoleALessThanRoleB(a: discord.GuildRoleObject, b: discord.GuildRoleObject) -> boolean end
Arguments
a
discord.GuildRoleObject Role A
b
discord.GuildRoleObject Role B
Returns
boolean
``true`` if A is lower than B in hierarchy order, ``false`` otherwise.
IsRoleALessThanOrEqualToRoleB
Returns if A is less than or equal to B in hierarchy order.
Function Signature
--- Returns if A is less than or equal to B in hierarchy order.
---
--- @param a discord.GuildRoleObject Role A
--- @param b discord.GuildRoleObject Role B
--- @return boolean \`\`true\`\` if A is lower than or equal to B in hierarchy order, \`\`false\`\` otherwise.
function IsRoleALessThanOrEqualToRoleB(a: discord.GuildRoleObject, b: discord.GuildRoleObject) -> boolean end
Arguments
a
discord.GuildRoleObject Role A
b
discord.GuildRoleObject Role B
Returns
boolean
``true`` if A is lower than or equal to B in hierarchy order, ``false`` otherwise.
IsRoleAGreaterThanRoleB
Returns if A is greater than B in hierarchy order.
Function Signature
--- Returns if A is greater than B in hierarchy order.
---
--- @param a discord.GuildRoleObject Role A
--- @param b discord.GuildRoleObject Role B
--- @return boolean \`\`true\`\` if A is greater than or equal to B in hierarchy order, \`\`false\`\` otherwise.
function IsRoleAGreaterThanRoleB(a: discord.GuildRoleObject, b: discord.GuildRoleObject) -> boolean end
Arguments
a
discord.GuildRoleObject Role A
b
discord.GuildRoleObject Role B
Returns
boolean
``true`` if A is greater than or equal to B in hierarchy order, ``false`` otherwise.
IsRoleAGreaterThanOrEqualToRoleB
Returns if Role A is greater than or equal to Role B in hierarchy order.
Function Signature
--- Returns if Role A is greater than or equal to Role B in hierarchy order.
---
--- @param a discord.GuildRoleObject Role A
--- @param b discord.GuildRoleObject Role B
--- @return boolean \`\`true\`\` if A is greater than or equal to B in hierarchy order, \`\`false\`\` otherwise.
function IsRoleAGreaterThanOrEqualToRoleB(a: discord.GuildRoleObject, b: discord.GuildRoleObject) -> boolean end
Arguments
a
discord.GuildRoleObject Role A
b
discord.GuildRoleObject Role B
Returns
boolean
``true`` if A is greater than or equal to B in hierarchy order, ``false`` otherwise.
SortRolesByHierarchyAsc
Sorts roles by hierarchy order in ascending order [lower roles first].
Function Signature
--- Sorts roles by hierarchy order in ascending order [lower roles first].
function SortRolesByHierarchyAsc(roles: {discord.GuildRoleObject}) -> {discord.GuildRoleObject} end
Arguments
roles
Returns
ret1
SortRolesByHierarchyDesc
Sorts roles by hierarchy order in descending order [roles higher in hierarchy first].
Function Signature
--- Sorts roles by hierarchy order in descending order [roles higher in hierarchy first].
function SortRolesByHierarchyDesc(roles: {discord.GuildRoleObject}) -> {discord.GuildRoleObject} end
Arguments
roles
Returns
ret1
Last updated on