Closed KubasPlay closed 5 years ago
For one I would recommend looking into the commands extension if you are making commands instead of using on_message. And two, you can compare roles using binary operators.
Also, this is not an issue with discord.py. GitHub issues for this repository should be used to report issues with this library. They are not a medium for requesting help with Python. For further help specific to using this library, you should join either the official discord.py server or the Discord API server, as the README recommends.
you can use ctx.guild.me.top_role > role to see if it is higher on the role list :T
Roles can be compared with comparator operators (i.e. <
, >
, >=
, <=
, etc).
I want to create administrator commands but I don't know how to check if message author top role is upper than user top role or if they're on the same place. My code:
I want to check before ban if message author top role is upper than mentioned user top role or if they're on the same place on the list.