discord-protos 1.0.4 → 1.2.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/.github/workflows/update.yml +45 -12
  2. package/.prettierrc.yml +1 -0
  3. package/MANIFEST.in +4 -0
  4. package/README.md +47 -16
  5. package/discord_protos/__init__.py +40 -0
  6. package/discord_protos/discord_kkv_store_value_models/v1/AcknowledgedApplicationDisclosures.proto +22 -0
  7. package/discord_protos/discord_kkv_store_value_models/v1/AcknowledgedApplicationDisclosures_pb2.py +42 -0
  8. package/discord_protos/discord_kkv_store_value_models/v1/ApplicationUserRoleConnection.proto +10 -0
  9. package/discord_protos/discord_kkv_store_value_models/v1/ApplicationUserRoleConnection_pb2.py +40 -0
  10. package/{out → discord_protos/discord_users/v1}/FrecencyUserSettings.proto +31 -5
  11. package/discord_protos/discord_users/v1/FrecencyUserSettings_pb2.py +100 -0
  12. package/discord_protos/discord_users/v1/PreloadedUserSettings.proto +497 -0
  13. package/discord_protos/discord_users/v1/PreloadedUserSettings_pb2.py +208 -0
  14. package/discord_protos/premium_marketing/v1/PremiumMarketingComponentProperties.proto +62 -0
  15. package/discord_protos/premium_marketing/v1/PremiumMarketingComponentProperties_pb2.py +60 -0
  16. package/dist/discord_protos/discord_kkv_store_value_models/v1/AcknowledgedApplicationDisclosures.d.ts +71 -0
  17. package/dist/discord_protos/discord_kkv_store_value_models/v1/AcknowledgedApplicationDisclosures.js +131 -0
  18. package/dist/discord_protos/discord_kkv_store_value_models/v1/ApplicationUserRoleConnection.d.ts +41 -0
  19. package/dist/discord_protos/discord_kkv_store_value_models/v1/ApplicationUserRoleConnection.js +94 -0
  20. package/dist/{proto → discord_protos/discord_users/v1}/FrecencyUserSettings.d.ts +184 -53
  21. package/dist/{proto → discord_protos/discord_users/v1}/FrecencyUserSettings.js +469 -96
  22. package/dist/discord_protos/discord_users/v1/PreloadedUserSettings.d.ts +2035 -0
  23. package/dist/discord_protos/discord_users/v1/PreloadedUserSettings.js +4200 -0
  24. package/dist/{proto → discord_protos}/google/protobuf/timestamp.d.ts +3 -6
  25. package/dist/{proto → discord_protos}/google/protobuf/timestamp.js +11 -11
  26. package/dist/{proto → discord_protos}/google/protobuf/wrappers.d.ts +9 -9
  27. package/dist/{proto → discord_protos}/google/protobuf/wrappers.js +28 -30
  28. package/dist/discord_protos/premium_marketing/v1/PremiumMarketingComponentProperties.d.ts +261 -0
  29. package/dist/discord_protos/premium_marketing/v1/PremiumMarketingComponentProperties.js +558 -0
  30. package/dist/index.d.ts +5 -2
  31. package/dist/index.js +34 -4
  32. package/dist/load.js +144 -8
  33. package/package.json +14 -13
  34. package/pyproject.toml +21 -0
  35. package/requirements.txt +1 -0
  36. package/scripts/parse.js +269 -0
  37. package/scripts/preload.js +17 -0
  38. package/setup.py +42 -0
  39. package/tsconfig.json +6 -4
  40. package/dist/parse.d.ts +0 -35
  41. package/dist/parse.js +0 -175
  42. package/dist/proto/PreloadedUserSettings.d.ts +0 -1022
  43. package/dist/proto/PreloadedUserSettings.js +0 -2235
  44. package/dist/test.d.ts +0 -1
  45. package/dist/test.js +0 -19
  46. package/out/PreloadedUserSettings.proto +0 -240
  47. package/package-lock.json +0 -1755
@@ -1,30 +1,63 @@
1
- name: update definitions
1
+ name: Update protobuf definitions
2
2
 
3
3
  on:
4
4
  workflow_dispatch:
5
5
  schedule:
6
- - cron: "0 0 * * *"
6
+ - cron: "0 */3 * * *"
7
7
 
8
8
  jobs:
9
9
  update:
10
10
  runs-on: ubuntu-latest
11
11
 
12
12
  permissions:
13
- # Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
13
+ # Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository
14
14
  contents: write
15
+ id-token: write
15
16
 
16
17
  steps:
17
- - uses: actions/checkout@v3
18
+ - name: Checkout repository
19
+ uses: actions/checkout@v4
18
20
  with:
19
21
  ref: ${{ github.head_ref }}
20
- - uses: actions/setup-node@v3
22
+
23
+ - name: Install Node.js
24
+ uses: actions/setup-node@v4
21
25
  with:
22
- node-version: 18
23
- - run: npm install
24
- - run: npm run load
25
- - run: npm run build
26
- - run: npm run test
26
+ node-version: 'latest'
27
+ registry-url: 'https://registry.npmjs.org'
27
28
 
28
- - uses: stefanzweifel/git-auto-commit-action@v4
29
+ - name: Install protoc
30
+ uses: arduino/setup-protoc@v3
29
31
  with:
30
- commit_message: Update protobuffer definitions
32
+ version: '28.x'
33
+
34
+ - name: Install dependencies
35
+ run: npm install
36
+
37
+ - name: Load protobuf definitions
38
+ run: |
39
+ # Fix puppeteer on Ubuntu 23.10+
40
+ # See https://github.com/puppeteer/puppeteer/issues/12818
41
+ echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
42
+ npm run load
43
+ shell: bash
44
+
45
+ - name: Build protobuf definitions
46
+ run: |
47
+ npm run js
48
+ npm run py
49
+
50
+ - name: Commit changes
51
+ run: |
52
+ git config --global user.name "github-actions[bot]"
53
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
54
+ git add .
55
+ git commit -m "Update protobuf definitions" || exit 0
56
+ git push
57
+ env:
58
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59
+
60
+ - name: Publish to NPM
61
+ run: npm publish --provenance --access public
62
+ env:
63
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/.prettierrc.yml CHANGED
@@ -1,3 +1,4 @@
1
1
  trailingComma: "all"
2
2
  tabWidth: 4
3
+ maxLineLength: 120
3
4
  printWidth: 140
package/MANIFEST.in ADDED
@@ -0,0 +1,4 @@
1
+ include README.md
2
+ include LICENSE
3
+ include requirements.txt
4
+ include discord_protos/*.proto
package/README.md CHANGED
@@ -1,13 +1,18 @@
1
1
  # Discord Protocol Buffers
2
- Reverse-engineering Discord's user settings protobufs.
2
+ Reverse-engineering Discord's protobufs.
3
3
 
4
- This repository provides protocol buffer files for Discord's user settings automatically generated and (soon™️) automatically updated. The protobufs are provided as .proto files in the out/ directory, one file per settings type.
4
+ 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.
5
5
 
6
- These protobufs are used by the Discord clients for user settings.
6
+ These protobufs are used by Discord clients for transmitting data like user settings and premium marketing.
7
7
 
8
8
  Provided for educational purposes only.
9
9
 
10
+ ### Credits
11
+
12
+ - [arHSM](https://github.com/arHSM) for originally reverse-engineering the technology behind Discord's protobuf implementation.
13
+
10
14
  ## Usage
15
+
11
16
  ### Note
12
17
  Automating user accounts is against the Discord ToS. This repository is a proof of concept and I cannot recommend using it. Do so at your own risk.
13
18
 
@@ -21,11 +26,14 @@ yarn add discord-protos
21
26
 
22
27
  # with pnpm
23
28
  pnpm add discord-protos
29
+
30
+ # with pip
31
+ pip install discord-protos
24
32
  ```
25
33
 
26
34
  ### Example
35
+ JavaScript:
27
36
  ```js
28
-
29
37
  const { PreloadedUserSettings } = require('discord-protos');
30
38
 
31
39
  const encoded = PreloadedUserSettings.toBase64({
@@ -35,9 +43,9 @@ const encoded = PreloadedUserSettings.toBase64({
35
43
  },
36
44
  customStatus: {
37
45
  text: "Hello World",
38
- emojiId: 0n,
39
- emojiName: "",
40
- expiresAtMs: 0n,
46
+ emojiId: 0n,
47
+ emojiName: "",
48
+ expiresAtMs: 0n,
41
49
  },
42
50
  },
43
51
  });
@@ -47,21 +55,44 @@ const decoded = PreloadedUserSettings.fromBase64(encoded);
47
55
  console.log(encoded, decoded);
48
56
  ```
49
57
 
58
+ Python:
59
+ ```py
60
+ import base64
61
+ from discord_protos import PreloadedUserSettings
62
+
63
+ settings = PreloadedUserSettings()
64
+ encoded = base64.b64encode(settings.ParseDict({
65
+ 'status': {
66
+ 'status': {
67
+ 'value': 'online',
68
+ },
69
+ 'custom_status': {
70
+ 'text': 'Hello World',
71
+ 'emoji_id': 0,
72
+ 'emoji_name': '',
73
+ 'expires_at_ms': 0,
74
+ },
75
+ },
76
+ }).SerializeToString())
77
+
78
+ decoded = PreloadedUserSettings.FromString(base64.b64decode(encoded))
79
+
80
+ print(encoded, decoded)
81
+ ```
50
82
 
51
- ## Mapping
52
- The following table shows which protobuf user settings correspond to which .proto file.
83
+ The following table shows which protobuf user settings correspond to which .proto file (the Python package also provides a `UserSettingsType` enum for convenience).
53
84
 
54
- | Type | Value | File | Use |
55
- |-------|-----------------------------------|-----------------------------|----------------------------------------------------|
56
- | 1 | `PRELOADED_USER_SETTINGS` | PreloadedUserSettings.proto | General Discord user settings. |
57
- | 2 | `FRECENCY_AND_FAVORITES_SETTINGS` | FrecencyUserSettings.proto | Frecency and favorites storage for various things. |
58
- | 3 | `TEST_SETTINGS` | - | Unknown. |
85
+ | Type | Value | File | Use |
86
+ | ---- | --------------------------------- | --------------------------- | -------------------------------------------------- |
87
+ | 1 | `PRELOADED_USER_SETTINGS` | PreloadedUserSettings.proto | General Discord user settings. |
88
+ | 2 | `FRECENCY_AND_FAVORITES_SETTINGS` | FrecencyUserSettings.proto | Frecency and favorites storage for various things. |
89
+ | 3 | `TEST_SETTINGS` | - | Unknown. |
59
90
 
91
+ Base64-encoded data for these protobufs are provided by the `GET /users/@me/settings-proto/{type}` endpoint. For preloaded user settings, base64-encoded data is provided in the `user_settings_proto` key of the `READY` event received in the Discord Gateway, as well as in `USER_SETTINGS_PROTO_UPDATE` events.
60
92
 
61
93
  ### Protobufs
62
94
  The .proto files can be compiled down to Python or JavaScript files by running `npm run py` or `npm run js`. This requires protoc to be installed.
63
95
 
64
- Base64-encoded data for these protobufs are provided by the `GET /users/@me/settings-proto/{type}` endpoint. For preloaded user settings, base64-encoded data is provided in the `USER_SETTINGS_PROTO` key of the READY event received in the Discord Gateway.
65
96
 
66
97
  ### Development
67
- Running script in src/parse.js will print out the protocol buffers found. You need to define a `getModules()` function for it to work. That is on you.
98
+ Running `pnpm load` will extract and save the latest protobufs to the `discord_protos/` directory.
@@ -0,0 +1,40 @@
1
+ from __future__ import annotations
2
+
3
+ from enum import Enum as _Enum
4
+ from typing import TYPE_CHECKING
5
+
6
+ __version__ = '1.2.43'
7
+
8
+ if TYPE_CHECKING:
9
+ from google.protobuf.message import Message as _Message
10
+
11
+ PreloadedUserSettings = FrecencyUserSettings = ApplicationUserRoleConnection = AcknowledgedApplicationDisclosures = PremiumMarketingComponentProperties = _Message
12
+ else:
13
+ from .discord_users.v1.PreloadedUserSettings_pb2 import *
14
+ from .discord_users.v1.FrecencyUserSettings_pb2 import *
15
+ from .discord_kkv_store_value_models.v1.ApplicationUserRoleConnection_pb2 import *
16
+ from .discord_kkv_store_value_models.v1.AcknowledgedApplicationDisclosures_pb2 import *
17
+ from .premium_marketing.v1.PremiumMarketingComponentProperties_pb2 import *
18
+
19
+ __all__ = (
20
+ '__version__',
21
+ 'UserSettingsType',
22
+ 'PreloadedUserSettings',
23
+ 'FrecencyUserSettings',
24
+ 'ApplicationUserRoleConnection',
25
+ 'AcknowledgedApplicationDisclosures',
26
+ 'PremiumMarketingComponentProperties',
27
+ )
28
+
29
+
30
+ class UserSettingsType(_Enum):
31
+ preloaded_user_settings = 1
32
+ frecency_user_settings = 2
33
+ test_settings = 3
34
+
35
+
36
+ UserSettingsImpl = {
37
+ UserSettingsType.preloaded_user_settings: PreloadedUserSettings,
38
+ UserSettingsType.frecency_user_settings: FrecencyUserSettings,
39
+ UserSettingsType.test_settings: None,
40
+ }
@@ -0,0 +1,22 @@
1
+ syntax = "proto3";
2
+
3
+ import "google/protobuf/wrappers.proto";
4
+ import "google/protobuf/timestamp.proto";
5
+
6
+ package discord_protos.discord_kkv_store_value_models.v1;
7
+
8
+ message AcknowledgedApplicationDisclosures {
9
+ enum ApplicationDisclosureType {
10
+ APPLICATION_DISCLOSURE_TYPE_UNSPECIFIED_DISCLOSURE = 0;
11
+ APPLICATION_DISCLOSURE_TYPE_IP_LOCATION = 1;
12
+ APPLICATION_DISCLOSURE_TYPE_DISPLAYS_ADVERTISEMENTS = 2;
13
+ APPLICATION_DISCLOSURE_TYPE_PARTNER_SDK_DATA_SHARING_MESSAGE = 3;
14
+ }
15
+
16
+ message AcknowledgedApplicationDisclosure {
17
+ ApplicationDisclosureType disclosure_type = 1;
18
+ optional google.protobuf.Timestamp acked_at = 2;
19
+ }
20
+
21
+ repeated AcknowledgedApplicationDisclosure acked_disclosures = 1;
22
+ }
@@ -0,0 +1,42 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: discord_kkv_store_value_models/v1/AcknowledgedApplicationDisclosures.proto
5
+ # Protobuf Python Version: 5.28.3
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 28,
16
+ 3,
17
+ '',
18
+ 'discord_kkv_store_value_models/v1/AcknowledgedApplicationDisclosures.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2
26
+ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
27
+
28
+
29
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nJdiscord_kkv_store_value_models/v1/AcknowledgedApplicationDisclosures.proto\x12\x30\x64iscord_protos.discord_kkv_store_value_models.v1\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa6\x05\n\"AcknowledgedApplicationDisclosures\x12\x91\x01\n\x11\x61\x63ked_disclosures\x18\x01 \x03(\x0b\x32v.discord_protos.discord_kkv_store_value_models.v1.AcknowledgedApplicationDisclosures.AcknowledgedApplicationDisclosure\x1a\xed\x01\n!AcknowledgedApplicationDisclosure\x12\x87\x01\n\x0f\x64isclosure_type\x18\x01 \x01(\x0e\x32n.discord_protos.discord_kkv_store_value_models.v1.AcknowledgedApplicationDisclosures.ApplicationDisclosureType\x12\x31\n\x08\x61\x63ked_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x42\x0b\n\t_acked_at\"\xfb\x01\n\x19\x41pplicationDisclosureType\x12\x36\n2APPLICATION_DISCLOSURE_TYPE_UNSPECIFIED_DISCLOSURE\x10\x00\x12+\n\'APPLICATION_DISCLOSURE_TYPE_IP_LOCATION\x10\x01\x12\x37\n3APPLICATION_DISCLOSURE_TYPE_DISPLAYS_ADVERTISEMENTS\x10\x02\x12@\n<APPLICATION_DISCLOSURE_TYPE_PARTNER_SDK_DATA_SHARING_MESSAGE\x10\x03\x62\x06proto3')
30
+
31
+ _globals = globals()
32
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
33
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'discord_kkv_store_value_models.v1.AcknowledgedApplicationDisclosures_pb2', _globals)
34
+ if not _descriptor._USE_C_DESCRIPTORS:
35
+ DESCRIPTOR._loaded_options = None
36
+ _globals['_ACKNOWLEDGEDAPPLICATIONDISCLOSURES']._serialized_start=194
37
+ _globals['_ACKNOWLEDGEDAPPLICATIONDISCLOSURES']._serialized_end=872
38
+ _globals['_ACKNOWLEDGEDAPPLICATIONDISCLOSURES_ACKNOWLEDGEDAPPLICATIONDISCLOSURE']._serialized_start=381
39
+ _globals['_ACKNOWLEDGEDAPPLICATIONDISCLOSURES_ACKNOWLEDGEDAPPLICATIONDISCLOSURE']._serialized_end=618
40
+ _globals['_ACKNOWLEDGEDAPPLICATIONDISCLOSURES_APPLICATIONDISCLOSURETYPE']._serialized_start=621
41
+ _globals['_ACKNOWLEDGEDAPPLICATIONDISCLOSURES_APPLICATIONDISCLOSURETYPE']._serialized_end=872
42
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,10 @@
1
+ syntax = "proto3";
2
+
3
+ package discord_protos.discord_kkv_store_value_models.v1;
4
+
5
+ message ApplicationUserRoleConnection {
6
+ map<string, string> metadata = 1;
7
+ string platform_name = 2;
8
+ string platform_username = 3;
9
+ fixed64 version = 4;
10
+ }
@@ -0,0 +1,40 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: discord_kkv_store_value_models/v1/ApplicationUserRoleConnection.proto
5
+ # Protobuf Python Version: 5.28.3
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 28,
16
+ 3,
17
+ '',
18
+ 'discord_kkv_store_value_models/v1/ApplicationUserRoleConnection.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+
26
+
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nEdiscord_kkv_store_value_models/v1/ApplicationUserRoleConnection.proto\x12\x30\x64iscord_protos.discord_kkv_store_value_models.v1\"\x84\x02\n\x1d\x41pplicationUserRoleConnection\x12o\n\x08metadata\x18\x01 \x03(\x0b\x32].discord_protos.discord_kkv_store_value_models.v1.ApplicationUserRoleConnection.MetadataEntry\x12\x15\n\rplatform_name\x18\x02 \x01(\t\x12\x19\n\x11platform_username\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\x06\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x62\x06proto3')
28
+
29
+ _globals = globals()
30
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'discord_kkv_store_value_models.v1.ApplicationUserRoleConnection_pb2', _globals)
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ DESCRIPTOR._loaded_options = None
34
+ _globals['_APPLICATIONUSERROLECONNECTION_METADATAENTRY']._loaded_options = None
35
+ _globals['_APPLICATIONUSERROLECONNECTION_METADATAENTRY']._serialized_options = b'8\001'
36
+ _globals['_APPLICATIONUSERROLECONNECTION']._serialized_start=124
37
+ _globals['_APPLICATIONUSERROLECONNECTION']._serialized_end=384
38
+ _globals['_APPLICATIONUSERROLECONNECTION_METADATAENTRY']._serialized_start=337
39
+ _globals['_APPLICATIONUSERROLECONNECTION_METADATAENTRY']._serialized_end=384
40
+ # @@protoc_insertion_point(module_scope)
@@ -1,6 +1,6 @@
1
1
  syntax = "proto3";
2
2
 
3
- package discord_protos.discord_users.v1.FrecencyUserSettings;
3
+ package discord_protos.discord_users.v1;
4
4
 
5
5
  message FrecencyUserSettings {
6
6
  message Versions {
@@ -10,9 +10,9 @@ message FrecencyUserSettings {
10
10
  }
11
11
 
12
12
  enum GIFType {
13
- NONE = 0;
14
- IMAGE = 1;
15
- VIDEO = 2;
13
+ GIF_TYPE_NONE = 0;
14
+ GIF_TYPE_IMAGE = 1;
15
+ GIF_TYPE_VIDEO = 2;
16
16
  }
17
17
 
18
18
  message FavoriteGIF {
@@ -44,7 +44,7 @@ message FrecencyUserSettings {
44
44
  }
45
45
 
46
46
  message FavoriteEmojis {
47
- repeated string emojis = 1;
47
+ repeated string emojis = 1 [packed = false];
48
48
  }
49
49
 
50
50
  message EmojiFrecency {
@@ -55,6 +55,26 @@ message FrecencyUserSettings {
55
55
  map<string, FrecencyItem> application_commands = 1;
56
56
  }
57
57
 
58
+ message FavoriteSoundboardSounds {
59
+ repeated fixed64 sound_ids = 1;
60
+ }
61
+
62
+ message ApplicationFrecency {
63
+ map<string, FrecencyItem> applications = 1;
64
+ }
65
+
66
+ message HeardSoundFrecency {
67
+ map<string, FrecencyItem> heard_sounds = 1;
68
+ }
69
+
70
+ message PlayedSoundFrecency {
71
+ map<string, FrecencyItem> played_sounds = 1;
72
+ }
73
+
74
+ message GuildAndChannelFrecency {
75
+ map<fixed64, FrecencyItem> guild_and_channels = 1;
76
+ }
77
+
58
78
  optional Versions versions = 1;
59
79
  optional FavoriteGIFs favorite_gifs = 2;
60
80
  optional FavoriteStickers favorite_stickers = 3;
@@ -62,4 +82,10 @@ message FrecencyUserSettings {
62
82
  optional FavoriteEmojis favorite_emojis = 5;
63
83
  optional EmojiFrecency emoji_frecency = 6;
64
84
  optional ApplicationCommandFrecency application_command_frecency = 7;
85
+ optional FavoriteSoundboardSounds favorite_soundboard_sounds = 8;
86
+ optional ApplicationFrecency application_frecency = 9;
87
+ optional HeardSoundFrecency heard_sound_frecency = 10;
88
+ optional PlayedSoundFrecency played_sound_frecency = 11;
89
+ optional GuildAndChannelFrecency guild_and_channel_frecency = 12;
90
+ optional EmojiFrecency emoji_reaction_frecency = 13;
65
91
  }
@@ -0,0 +1,100 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: discord_users/v1/FrecencyUserSettings.proto
5
+ # Protobuf Python Version: 5.28.3
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 28,
16
+ 3,
17
+ '',
18
+ 'discord_users/v1/FrecencyUserSettings.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+
26
+
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n+discord_users/v1/FrecencyUserSettings.proto\x12\x1f\x64iscord_protos.discord_users.v1\"\xdb!\n\x14\x46recencyUserSettings\x12U\n\x08versions\x18\x01 \x01(\x0b\x32>.discord_protos.discord_users.v1.FrecencyUserSettings.VersionsH\x00\x88\x01\x01\x12^\n\rfavorite_gifs\x18\x02 \x01(\x0b\x32\x42.discord_protos.discord_users.v1.FrecencyUserSettings.FavoriteGIFsH\x01\x88\x01\x01\x12\x66\n\x11\x66\x61vorite_stickers\x18\x03 \x01(\x0b\x32\x46.discord_protos.discord_users.v1.FrecencyUserSettings.FavoriteStickersH\x02\x88\x01\x01\x12\x64\n\x10sticker_frecency\x18\x04 \x01(\x0b\x32\x45.discord_protos.discord_users.v1.FrecencyUserSettings.StickerFrecencyH\x03\x88\x01\x01\x12\x62\n\x0f\x66\x61vorite_emojis\x18\x05 \x01(\x0b\x32\x44.discord_protos.discord_users.v1.FrecencyUserSettings.FavoriteEmojisH\x04\x88\x01\x01\x12`\n\x0e\x65moji_frecency\x18\x06 \x01(\x0b\x32\x43.discord_protos.discord_users.v1.FrecencyUserSettings.EmojiFrecencyH\x05\x88\x01\x01\x12{\n\x1c\x61pplication_command_frecency\x18\x07 \x01(\x0b\x32P.discord_protos.discord_users.v1.FrecencyUserSettings.ApplicationCommandFrecencyH\x06\x88\x01\x01\x12w\n\x1a\x66\x61vorite_soundboard_sounds\x18\x08 \x01(\x0b\x32N.discord_protos.discord_users.v1.FrecencyUserSettings.FavoriteSoundboardSoundsH\x07\x88\x01\x01\x12l\n\x14\x61pplication_frecency\x18\t \x01(\x0b\x32I.discord_protos.discord_users.v1.FrecencyUserSettings.ApplicationFrecencyH\x08\x88\x01\x01\x12k\n\x14heard_sound_frecency\x18\n \x01(\x0b\x32H.discord_protos.discord_users.v1.FrecencyUserSettings.HeardSoundFrecencyH\t\x88\x01\x01\x12m\n\x15played_sound_frecency\x18\x0b \x01(\x0b\x32I.discord_protos.discord_users.v1.FrecencyUserSettings.PlayedSoundFrecencyH\n\x88\x01\x01\x12v\n\x1aguild_and_channel_frecency\x18\x0c \x01(\x0b\x32M.discord_protos.discord_users.v1.FrecencyUserSettings.GuildAndChannelFrecencyH\x0b\x88\x01\x01\x12i\n\x17\x65moji_reaction_frecency\x18\r \x01(\x0b\x32\x43.discord_protos.discord_users.v1.FrecencyUserSettings.EmojiFrecencyH\x0c\x88\x01\x01\x1aP\n\x08Versions\x12\x16\n\x0e\x63lient_version\x18\x01 \x01(\r\x12\x16\n\x0eserver_version\x18\x02 \x01(\r\x12\x14\n\x0c\x64\x61ta_version\x18\x03 \x01(\r\x1a\x97\x01\n\x0b\x46\x61voriteGIF\x12M\n\x06\x66ormat\x18\x01 \x01(\x0e\x32=.discord_protos.discord_users.v1.FrecencyUserSettings.GIFType\x12\x0b\n\x03src\x18\x02 \x01(\t\x12\r\n\x05width\x18\x03 \x01(\r\x12\x0e\n\x06height\x18\x04 \x01(\r\x12\r\n\x05order\x18\x05 \x01(\r\x1a\xf0\x01\n\x0c\x46\x61voriteGIFs\x12Z\n\x04gifs\x18\x01 \x03(\x0b\x32L.discord_protos.discord_users.v1.FrecencyUserSettings.FavoriteGIFs.GifsEntry\x12\x14\n\x0chide_tooltip\x18\x02 \x01(\x08\x1an\n\tGifsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12P\n\x05value\x18\x02 \x01(\x0b\x32\x41.discord_protos.discord_users.v1.FrecencyUserSettings.FavoriteGIF:\x02\x38\x01\x1a\'\n\x10\x46\x61voriteStickers\x12\x13\n\x0bsticker_ids\x18\x01 \x03(\x06\x1aX\n\x0c\x46recencyItem\x12\x12\n\ntotal_uses\x18\x01 \x01(\r\x12\x13\n\x0brecent_uses\x18\x02 \x03(\x04\x12\x10\n\x08\x66recency\x18\x03 \x01(\x05\x12\r\n\x05score\x18\x04 \x01(\x05\x1a\xed\x01\n\x0fStickerFrecency\x12\x65\n\x08stickers\x18\x01 \x03(\x0b\x32S.discord_protos.discord_users.v1.FrecencyUserSettings.StickerFrecency.StickersEntry\x1as\n\rStickersEntry\x12\x0b\n\x03key\x18\x01 \x01(\x06\x12Q\n\x05value\x18\x02 \x01(\x0b\x32\x42.discord_protos.discord_users.v1.FrecencyUserSettings.FrecencyItem:\x02\x38\x01\x1a$\n\x0e\x46\x61voriteEmojis\x12\x12\n\x06\x65mojis\x18\x01 \x03(\tB\x02\x10\x00\x1a\xe3\x01\n\rEmojiFrecency\x12_\n\x06\x65mojis\x18\x01 \x03(\x0b\x32O.discord_protos.discord_users.v1.FrecencyUserSettings.EmojiFrecency.EmojisEntry\x1aq\n\x0b\x45mojisEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12Q\n\x05value\x18\x02 \x01(\x0b\x32\x42.discord_protos.discord_users.v1.FrecencyUserSettings.FrecencyItem:\x02\x38\x01\x1a\xa6\x02\n\x1a\x41pplicationCommandFrecency\x12\x87\x01\n\x14\x61pplication_commands\x18\x01 \x03(\x0b\x32i.discord_protos.discord_users.v1.FrecencyUserSettings.ApplicationCommandFrecency.ApplicationCommandsEntry\x1a~\n\x18\x41pplicationCommandsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12Q\n\x05value\x18\x02 \x01(\x0b\x32\x42.discord_protos.discord_users.v1.FrecencyUserSettings.FrecencyItem:\x02\x38\x01\x1a-\n\x18\x46\x61voriteSoundboardSounds\x12\x11\n\tsound_ids\x18\x01 \x03(\x06\x1a\x81\x02\n\x13\x41pplicationFrecency\x12q\n\x0c\x61pplications\x18\x01 \x03(\x0b\x32[.discord_protos.discord_users.v1.FrecencyUserSettings.ApplicationFrecency.ApplicationsEntry\x1aw\n\x11\x41pplicationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12Q\n\x05value\x18\x02 \x01(\x0b\x32\x42.discord_protos.discord_users.v1.FrecencyUserSettings.FrecencyItem:\x02\x38\x01\x1a\xfd\x01\n\x12HeardSoundFrecency\x12o\n\x0cheard_sounds\x18\x01 \x03(\x0b\x32Y.discord_protos.discord_users.v1.FrecencyUserSettings.HeardSoundFrecency.HeardSoundsEntry\x1av\n\x10HeardSoundsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12Q\n\x05value\x18\x02 \x01(\x0b\x32\x42.discord_protos.discord_users.v1.FrecencyUserSettings.FrecencyItem:\x02\x38\x01\x1a\x82\x02\n\x13PlayedSoundFrecency\x12r\n\rplayed_sounds\x18\x01 \x03(\x0b\x32[.discord_protos.discord_users.v1.FrecencyUserSettings.PlayedSoundFrecency.PlayedSoundsEntry\x1aw\n\x11PlayedSoundsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12Q\n\x05value\x18\x02 \x01(\x0b\x32\x42.discord_protos.discord_users.v1.FrecencyUserSettings.FrecencyItem:\x02\x38\x01\x1a\x97\x02\n\x17GuildAndChannelFrecency\x12\x7f\n\x12guild_and_channels\x18\x01 \x03(\x0b\x32\x63.discord_protos.discord_users.v1.FrecencyUserSettings.GuildAndChannelFrecency.GuildAndChannelsEntry\x1a{\n\x15GuildAndChannelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x06\x12Q\n\x05value\x18\x02 \x01(\x0b\x32\x42.discord_protos.discord_users.v1.FrecencyUserSettings.FrecencyItem:\x02\x38\x01\"D\n\x07GIFType\x12\x11\n\rGIF_TYPE_NONE\x10\x00\x12\x12\n\x0eGIF_TYPE_IMAGE\x10\x01\x12\x12\n\x0eGIF_TYPE_VIDEO\x10\x02\x42\x0b\n\t_versionsB\x10\n\x0e_favorite_gifsB\x14\n\x12_favorite_stickersB\x13\n\x11_sticker_frecencyB\x12\n\x10_favorite_emojisB\x11\n\x0f_emoji_frecencyB\x1f\n\x1d_application_command_frecencyB\x1d\n\x1b_favorite_soundboard_soundsB\x17\n\x15_application_frecencyB\x17\n\x15_heard_sound_frecencyB\x18\n\x16_played_sound_frecencyB\x1d\n\x1b_guild_and_channel_frecencyB\x1a\n\x18_emoji_reaction_frecencyb\x06proto3')
28
+
29
+ _globals = globals()
30
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'discord_users.v1.FrecencyUserSettings_pb2', _globals)
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ DESCRIPTOR._loaded_options = None
34
+ _globals['_FRECENCYUSERSETTINGS_FAVORITEGIFS_GIFSENTRY']._loaded_options = None
35
+ _globals['_FRECENCYUSERSETTINGS_FAVORITEGIFS_GIFSENTRY']._serialized_options = b'8\001'
36
+ _globals['_FRECENCYUSERSETTINGS_STICKERFRECENCY_STICKERSENTRY']._loaded_options = None
37
+ _globals['_FRECENCYUSERSETTINGS_STICKERFRECENCY_STICKERSENTRY']._serialized_options = b'8\001'
38
+ _globals['_FRECENCYUSERSETTINGS_FAVORITEEMOJIS'].fields_by_name['emojis']._loaded_options = None
39
+ _globals['_FRECENCYUSERSETTINGS_FAVORITEEMOJIS'].fields_by_name['emojis']._serialized_options = b'\020\000'
40
+ _globals['_FRECENCYUSERSETTINGS_EMOJIFRECENCY_EMOJISENTRY']._loaded_options = None
41
+ _globals['_FRECENCYUSERSETTINGS_EMOJIFRECENCY_EMOJISENTRY']._serialized_options = b'8\001'
42
+ _globals['_FRECENCYUSERSETTINGS_APPLICATIONCOMMANDFRECENCY_APPLICATIONCOMMANDSENTRY']._loaded_options = None
43
+ _globals['_FRECENCYUSERSETTINGS_APPLICATIONCOMMANDFRECENCY_APPLICATIONCOMMANDSENTRY']._serialized_options = b'8\001'
44
+ _globals['_FRECENCYUSERSETTINGS_APPLICATIONFRECENCY_APPLICATIONSENTRY']._loaded_options = None
45
+ _globals['_FRECENCYUSERSETTINGS_APPLICATIONFRECENCY_APPLICATIONSENTRY']._serialized_options = b'8\001'
46
+ _globals['_FRECENCYUSERSETTINGS_HEARDSOUNDFRECENCY_HEARDSOUNDSENTRY']._loaded_options = None
47
+ _globals['_FRECENCYUSERSETTINGS_HEARDSOUNDFRECENCY_HEARDSOUNDSENTRY']._serialized_options = b'8\001'
48
+ _globals['_FRECENCYUSERSETTINGS_PLAYEDSOUNDFRECENCY_PLAYEDSOUNDSENTRY']._loaded_options = None
49
+ _globals['_FRECENCYUSERSETTINGS_PLAYEDSOUNDFRECENCY_PLAYEDSOUNDSENTRY']._serialized_options = b'8\001'
50
+ _globals['_FRECENCYUSERSETTINGS_GUILDANDCHANNELFRECENCY_GUILDANDCHANNELSENTRY']._loaded_options = None
51
+ _globals['_FRECENCYUSERSETTINGS_GUILDANDCHANNELFRECENCY_GUILDANDCHANNELSENTRY']._serialized_options = b'8\001'
52
+ _globals['_FRECENCYUSERSETTINGS']._serialized_start=81
53
+ _globals['_FRECENCYUSERSETTINGS']._serialized_end=4396
54
+ _globals['_FRECENCYUSERSETTINGS_VERSIONS']._serialized_start=1495
55
+ _globals['_FRECENCYUSERSETTINGS_VERSIONS']._serialized_end=1575
56
+ _globals['_FRECENCYUSERSETTINGS_FAVORITEGIF']._serialized_start=1578
57
+ _globals['_FRECENCYUSERSETTINGS_FAVORITEGIF']._serialized_end=1729
58
+ _globals['_FRECENCYUSERSETTINGS_FAVORITEGIFS']._serialized_start=1732
59
+ _globals['_FRECENCYUSERSETTINGS_FAVORITEGIFS']._serialized_end=1972
60
+ _globals['_FRECENCYUSERSETTINGS_FAVORITEGIFS_GIFSENTRY']._serialized_start=1862
61
+ _globals['_FRECENCYUSERSETTINGS_FAVORITEGIFS_GIFSENTRY']._serialized_end=1972
62
+ _globals['_FRECENCYUSERSETTINGS_FAVORITESTICKERS']._serialized_start=1974
63
+ _globals['_FRECENCYUSERSETTINGS_FAVORITESTICKERS']._serialized_end=2013
64
+ _globals['_FRECENCYUSERSETTINGS_FRECENCYITEM']._serialized_start=2015
65
+ _globals['_FRECENCYUSERSETTINGS_FRECENCYITEM']._serialized_end=2103
66
+ _globals['_FRECENCYUSERSETTINGS_STICKERFRECENCY']._serialized_start=2106
67
+ _globals['_FRECENCYUSERSETTINGS_STICKERFRECENCY']._serialized_end=2343
68
+ _globals['_FRECENCYUSERSETTINGS_STICKERFRECENCY_STICKERSENTRY']._serialized_start=2228
69
+ _globals['_FRECENCYUSERSETTINGS_STICKERFRECENCY_STICKERSENTRY']._serialized_end=2343
70
+ _globals['_FRECENCYUSERSETTINGS_FAVORITEEMOJIS']._serialized_start=2345
71
+ _globals['_FRECENCYUSERSETTINGS_FAVORITEEMOJIS']._serialized_end=2381
72
+ _globals['_FRECENCYUSERSETTINGS_EMOJIFRECENCY']._serialized_start=2384
73
+ _globals['_FRECENCYUSERSETTINGS_EMOJIFRECENCY']._serialized_end=2611
74
+ _globals['_FRECENCYUSERSETTINGS_EMOJIFRECENCY_EMOJISENTRY']._serialized_start=2498
75
+ _globals['_FRECENCYUSERSETTINGS_EMOJIFRECENCY_EMOJISENTRY']._serialized_end=2611
76
+ _globals['_FRECENCYUSERSETTINGS_APPLICATIONCOMMANDFRECENCY']._serialized_start=2614
77
+ _globals['_FRECENCYUSERSETTINGS_APPLICATIONCOMMANDFRECENCY']._serialized_end=2908
78
+ _globals['_FRECENCYUSERSETTINGS_APPLICATIONCOMMANDFRECENCY_APPLICATIONCOMMANDSENTRY']._serialized_start=2782
79
+ _globals['_FRECENCYUSERSETTINGS_APPLICATIONCOMMANDFRECENCY_APPLICATIONCOMMANDSENTRY']._serialized_end=2908
80
+ _globals['_FRECENCYUSERSETTINGS_FAVORITESOUNDBOARDSOUNDS']._serialized_start=2910
81
+ _globals['_FRECENCYUSERSETTINGS_FAVORITESOUNDBOARDSOUNDS']._serialized_end=2955
82
+ _globals['_FRECENCYUSERSETTINGS_APPLICATIONFRECENCY']._serialized_start=2958
83
+ _globals['_FRECENCYUSERSETTINGS_APPLICATIONFRECENCY']._serialized_end=3215
84
+ _globals['_FRECENCYUSERSETTINGS_APPLICATIONFRECENCY_APPLICATIONSENTRY']._serialized_start=3096
85
+ _globals['_FRECENCYUSERSETTINGS_APPLICATIONFRECENCY_APPLICATIONSENTRY']._serialized_end=3215
86
+ _globals['_FRECENCYUSERSETTINGS_HEARDSOUNDFRECENCY']._serialized_start=3218
87
+ _globals['_FRECENCYUSERSETTINGS_HEARDSOUNDFRECENCY']._serialized_end=3471
88
+ _globals['_FRECENCYUSERSETTINGS_HEARDSOUNDFRECENCY_HEARDSOUNDSENTRY']._serialized_start=3353
89
+ _globals['_FRECENCYUSERSETTINGS_HEARDSOUNDFRECENCY_HEARDSOUNDSENTRY']._serialized_end=3471
90
+ _globals['_FRECENCYUSERSETTINGS_PLAYEDSOUNDFRECENCY']._serialized_start=3474
91
+ _globals['_FRECENCYUSERSETTINGS_PLAYEDSOUNDFRECENCY']._serialized_end=3732
92
+ _globals['_FRECENCYUSERSETTINGS_PLAYEDSOUNDFRECENCY_PLAYEDSOUNDSENTRY']._serialized_start=3613
93
+ _globals['_FRECENCYUSERSETTINGS_PLAYEDSOUNDFRECENCY_PLAYEDSOUNDSENTRY']._serialized_end=3732
94
+ _globals['_FRECENCYUSERSETTINGS_GUILDANDCHANNELFRECENCY']._serialized_start=3735
95
+ _globals['_FRECENCYUSERSETTINGS_GUILDANDCHANNELFRECENCY']._serialized_end=4014
96
+ _globals['_FRECENCYUSERSETTINGS_GUILDANDCHANNELFRECENCY_GUILDANDCHANNELSENTRY']._serialized_start=3891
97
+ _globals['_FRECENCYUSERSETTINGS_GUILDANDCHANNELFRECENCY_GUILDANDCHANNELSENTRY']._serialized_end=4014
98
+ _globals['_FRECENCYUSERSETTINGS_GIFTYPE']._serialized_start=4016
99
+ _globals['_FRECENCYUSERSETTINGS_GIFTYPE']._serialized_end=4084
100
+ # @@protoc_insertion_point(module_scope)