Rather than using numerical values for roles, we should just use text values to minimize confusion.
So that comparisons are still easy, we can write a simple Role class with comparison __dunder__ methods defined, so that we can simply say packet.role > "moderator" without having any issues. (All possible roles will be defined, in order, in the Role class, and it will only accept those as inputs.)
Rather than using numerical values for roles, we should just use text values to minimize confusion.
So that comparisons are still easy, we can write a simple
Role
class with comparison__dunder__
methods defined, so that we can simply saypacket.role > "moderator"
without having any issues. (All possible roles will be defined, in order, in theRole
class, and it will only accept those as inputs.)