Skip to main content

Discord Protocol Buffers

Reverse-engineering Discord's protobufs.

This repository provides protocol buffer files for all protobufs found in Discord's client source, automatically generated and automatically updated. The protobufs are provided as .proto files in the out/ directory.

These protobufs are used by Discord clients for transmitting data like user settings and premium marketing.

Usage

Installation

Note: These packages are automatically updated when changes are detected in the protobufs. As Discord often updates their protobufs, pinning to a specific version may be advisable.

# with npm
npm install discord-protos

# with yarn
yarn add discord-protos

# with pnpm
pnpm add discord-protos

# with pip
pip install discord-protos

Example

JavaScript:

const { PreloadedUserSettings } = require('discord-protos');

const encoded = PreloadedUserSettings.toBase64({
    status: {
        status: {
            value: "online",
        },
        customStatus: {
            text: "Hello World",
            emojiId: 0n,
            emojiName: "",
            expiresAtMs: 0n,
            createdAtMs: 0n,
        },
    },
});

const decoded = PreloadedUserSettings.fromBase64(encoded);

console.log(encoded, decoded);

Python:

import base64

from google.protobuf.json_format import ParseDict
from discord_protos import PreloadedUserSettings

settings = PreloadedUserSettings()
payload = ParseDict({
    'status': {
        'status': 'online',
        'custom_status': {
            'text': 'Hello World',
        },
    },
}, settings).SerializeToString()

encoded = base64.b64encode(payload).decode('ascii')
decoded = PreloadedUserSettings.FromString(base64.b64decode(encoded))

print(encoded, decoded, sep='\n')

The following table shows which protobuf user settings correspond to which .proto file (the Python package also provides a UserSettingsType enum for convenience).

Type Value File Use
1 PRELOADED_USER_SETTINGS PreloadedUserSettings.proto General Discord user settings.
2 FRECENCY_AND_FAVORITES_SETTINGS FrecencyUserSettings.proto Frecency and favorites storage for various things.
3 TEST_SETTINGS - Unknown.

See Userdoccers for more information.

Development

Running pnpm load will extract and save the latest protobufs to the discord_protos/ directory.

Metadata

Release files for discord-protos 1.2.398

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for discord-protos 1.2.398
File Size Uploaded Provenance Actions
discord_protos-1.2.398.tar.gz 222.0 kB With provenance Details for discord_protos-1.2.398.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for discord-protos 1.2.398
File Interpreter ABI Platform Actions
discord_protos-1.2.398-py3-none-any.whl Python 3 none any Details for discord_protos-1.2.398-py3-none-any.whl

Total release size: 473.8 kB

Release files / discord_protos-1.2.398.tar.gz

Download URL discord_protos-1.2.398.tar.gz
Size 222.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5045db691b9ff9097eac8c786a9f4f1c8b1c23a558efe470f771fe2bdbf7b949
BLAKE2b-256 checksum
How to use checksums
5dae0d344d2dc1e97cb029ebcadbaaabb9aa99b6bbdc7e3f119646a6496c5837
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / discord_protos-1.2.398-py3-none-any.whl

Download URL discord_protos-1.2.398-py3-none-any.whl
Size 251.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7aa02485926c3797c4c9abcb515250d4a5908fff3812dc25ea3e51ef8c5c400b
BLAKE2b-256 checksum
How to use checksums
f06f286a87d2a4a69f2572abf1c194a3e9ae6fd0e565c7a51e6e6b21b3285704
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Security for discord-protos 1.2.398

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for discord_protos-1.2.398.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.398 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page