Discord Protos

raw JSON →
1.2.183 verified Fri May 01 auth: no python

Type stubs and Python bindings for Discord's internal protobuf definitions used in user settings and account data. Version 1.2.183 is the latest, following Discord's internal proto changes closely. Released on PyPI with no fixed cadence.

pip install discord-protos
error ImportError: cannot import name 'UserSettings' from 'discord_protos'
cause Top-level import instead of submodule import.
fix
Use from discord_protos.user_settings import UserSettings.
error AttributeError: 'UserSettings' object has no attribute 'discordStatus'
cause Using camelCase field names from JavaScript protobuf docs.
fix
Use snake_case field names like discord_status.
error TypeError: __init__() got an unexpected keyword argument 'message_ttl_days'
cause Passing keyword arguments directly; protobuf messages do not accept constructor kwargs in Python.
fix
Create an empty message and assign fields: msg = SomeMessage(); msg.field = value.
breaking Direct import of protobuf classes from top-level package fails; use submodule paths.
fix Use `from discord_protos.<submodule> import <Class>` matching the proto file name.
deprecated The package may be abandoned; last update was June 2023 and no commit since.
fix Consider forking or using the protos from the official Discord data exports directly.
gotcha Protobuf field names use snake_case (e.g., `discord_status`) not camelCase as in JavaScript.
fix Always check the .proto files or generated Python stubs for exact field names.

Deserialize a Discord user settings protobuf from file bytes.

import os
from discord_protos.user_settings import UserSettings

# Load serialized protobuf bytes
with open('user_settings.bin', 'rb') as f:
    data = f.read()
settings = UserSettings()
settings.ParseFromString(data)
print(settings.discord_status)
print(settings.theme)