Skip to content

Instantly share code, notes, and snippets.

View limijs's full-sized avatar

Keith H limijs

  • 19:24 (UTC -12:00)
View GitHub Profile
@limijs
limijs / bitwise_permissions.py
Last active May 1, 2024 22:12
Bitwise permission flags system that mimics Discord's
PERMISSIONS = {
"CREATE_INSTANT_INVITE": 1 << 0,
"KICK_MEMBERS": 1 << 1,
"BAN_MEMBERS": 1 << 2,
"ADMINISTRATOR": 1 << 3,
"MANAGE_CHANNELS": 1 << 4,
"MANAGE_GUILD": 1 << 5,
"ADD_REACTIONS": 1 << 6,
"VIEW_AUDIT_LOG": 1 << 7,
"PRIORITY_SPEAKER": 1 << 8,