Put in order · Vibe coding with Claude Code course · Module 9: Discord clone
Ordering: Steps of hasPermission
Arrange the steps of the hasPermission function in the order from the code:
Items to put in order
- Server owner: return true
- If there is ADMINISTRATOR: return true
- Role overwrites in the channel: first deny, then allow
- The member's own overwrite last
- Combine the member's role bits with the |= operator
You can check the correct answer by solving this task in the CodeWorlds game.