Permissions

Local Universe uses a bitfield-based permission system for controlling access within systems and channels. Permissions are stored as serialized bigints (strings in JSON).

Permission Bitfields

Each permission is a single bit in a bigint. To check if a permission is set, use a bitwise AND: (permissions & permission) === permission.

General Permissions

PermissionBitValueDescription
CREATE_INSTANT_INVITE01 << 0Create invites to the system
KICK_MEMBERS11 << 1Kick members from the system
BAN_MEMBERS21 << 2Ban members from the system
ADMINISTRATOR31 << 3Full access, bypasses all permission checks
MANAGE_CHANNELS41 << 4Create, edit, and delete channels
MANAGE_SYSTEM51 << 5Edit system name, icon, banner, and settings
ADD_REACTIONS61 << 6Add reactions to messages
VIEW_AUDIT_LOG71 << 7View the system audit log
PRIORITY_SPEAKER81 << 8Priority speaker in voice channels
STREAM91 << 9Stream in voice channels
VIEW_CHANNEL101 << 10View text and voice channels
SEND_MESSAGES111 << 11Send messages in text channels
SEND_TTS_MESSAGES121 << 12Send text-to-speech messages
MANAGE_MESSAGES131 << 13Delete messages and pin messages
EMBED_LINKS141 << 14Embed links in messages
ATTACH_FILES151 << 15Upload files in messages
READ_MESSAGE_HISTORY161 << 16Read message history
MENTION_EVERYONE171 << 17Use @everyone and @here mentions
USE_EXTERNAL_EMOJIS181 << 18Use emojis from other systems
VIEW_SYSTEM_INSIGHTS191 << 19View system analytics and insights

Voice Permissions

PermissionBitValueDescription
CONNECT201 << 20Connect to voice channels
SPEAK211 << 21Speak in voice channels
MUTE_MEMBERS221 << 22Mute other members in voice
DEAFEN_MEMBERS231 << 23Deafen other members in voice
MOVE_MEMBERS241 << 24Move members between voice channels
USE_VAD251 << 25Use voice activity detection

Management Permissions

PermissionBitValueDescription
CHANGE_NICKNAME261 << 26Change own nickname
MANAGE_NICKNAMES271 << 27Change other members' nicknames
MANAGE_ROLES281 << 28Create, edit, and delete roles
MANAGE_WEBHOOKS291 << 29Create, edit, and delete webhooks
MANAGE_EMOJIS_AND_STICKERS301 << 30Manage custom emojis and stickers
USE_APPLICATION_COMMANDS311 << 31Use bot and application commands
REQUEST_TO_SPEAK321 << 32Request to speak in stage channels
MANAGE_EVENTS331 << 33Create, edit, and delete events
MANAGE_THREADS341 << 34Manage threads
CREATE_PUBLIC_THREADS351 << 35Create public threads
CREATE_PRIVATE_THREADS361 << 36Create private threads
USE_EXTERNAL_STICKERS371 << 37Use stickers from other systems
SEND_MESSAGES_IN_THREADS381 << 38Send messages in threads
USE_EMBEDDED_ACTIVITIES391 << 39Use embedded activities
MODERATE_MEMBERS401 << 40Timeout and moderate members

LocalUniverse-Specific Permissions

PermissionBitValueDescription
BUILD411 << 41Place and modify tiles on planets
PLACE_PREFABS421 << 42Place prefab objects on planets
DESTROY431 << 43Destroy tiles and prefabs on planets
USE_VOICE_CHAT441 << 44Use voice chat in the system

Overwrite Types

Channel-level permission overwrites can target either a role or a specific member.

TypeValueDescription
ROLE0Overwrite applies to a role
MEMBER1Overwrite applies to a specific member

Permission Computation

Permissions are computed in the following order:

  1. Base permissions — combine the permissions of all roles the member has (bitwise OR)
  2. Administrator check — if the ADMINISTRATOR bit is set, grant all permissions
  3. @everyone overwrites — apply the channel's @everyone role overwrites (deny, then allow)
  4. Role overwrites — collect all matching role overwrites and apply (deny, then allow)
  5. Member overwrites — apply the member-specific overwrite if one exists (deny, then allow)

Member overwrites have the highest priority and can override any role-level permission.


Default Permissions

The default @everyone role in a new system is granted these permissions:

  • CREATE_INSTANT_INVITE
  • VIEW_CHANNEL
  • SEND_MESSAGES
  • READ_MESSAGE_HISTORY
  • ADD_REACTIONS
  • USE_EXTERNAL_EMOJIS
  • CONNECT
  • SPEAK
  • USE_VAD
  • CHANGE_NICKNAME
  • USE_VOICE_CHAT

Was this page helpful?