canInteract

suspend fun Member.canInteract(role: Role): Boolean

Checks if this Member can interact (delete/edit/assign/..) with the specified Role.

This checks if the Member has any role which is higher in hierarchy than Role. The logic also accounts for Guild ownership.

Throws an IllegalArgumentException if the role is from a different guild.


suspend fun Member.canInteract(member: Member): Boolean

Checks if this Member can interact (kick/ban/..) with another Member

This checks if the Member has any role which is higher in hierarchy than all Roles of the specified Member The logic also accounts for Guild ownership

Throws an IllegalArgumentException if the member is from a different guild.


fun Role.canInteract(role: Role): Boolean

Checks whether a Role can interact with another Role by comparing their rawPositions.

Throws an IllegalArgumentException when the roles are not from the same guild.