hikari-py/hikari

Add support for comparing roles

shahriyardx opened this issue · 1 comments

Summary

Currently we can't compare a role directly by saying Role1 > Role2

Why is this needed?

So comparing roles becomes easier

Ideal implementation

To be decided.

Checklist

  • I have searched the issue tracker and have made sure it's not a duplicate. If it is a follow up of another issue, I have specified it.

This has been deliberately not added, as there is no way to realistically say "one role is greater than another".

To check for role "order", you can follow the following rules:

  1. Compare their position attribute
  2. If they have the same position, compare them by ID