Skip to content

Instantly share code, notes, and snippets.

@RuslanUC
Last active February 24, 2023 10:04
Show Gist options
  • Save RuslanUC/066c722e77fdcf6e17d3eb0e60f1fc6a to your computer and use it in GitHub Desktop.
Save RuslanUC/066c722e77fdcf6e17d3eb0e60f1fc6a to your computer and use it in GitHub Desktop.

Revisions

  1. RuslanUC revised this gist Feb 24, 2023. 1 changed file with 33 additions and 32 deletions.
    65 changes: 33 additions & 32 deletions discord_FrecencyUserSettings.proto
    Original file line number Diff line number Diff line change
    @@ -1,64 +1,65 @@
    syntax = "proto3";
    package discord_protos.discord_users.v1;

    message Version {
    package discord_protos.discord_users.v1.FrecencyUserSettings;

    message FrecencyUserSettings {
    message Versions {
    uint32 client_version = 1;
    uint32 server_version = 2;
    uint32 data_version = 3;
    }
    }

    enum GIFType {
    enum GIFType {
    NONE = 0;
    IMAGE = 1;
    VIDEO = 2;
    }
    }

    message FavoriteGIF {
    message FavoriteGIF {
    GIFType format = 1;
    string src = 2;
    uint32 width = 3;
    uint32 height = 4;
    uint32 order = 5;
    }
    }

    message FavoriteGIFs {
    message FavoriteGIFs {
    map<string, FavoriteGIF> gifs = 1;
    bool hide_tooltip = 2;
    }
    }

    message FavoriteStickers {
    repeated fixed64 sticker_ids = 1 [packed = true];
    }
    message FavoriteStickers {
    repeated fixed64 sticker_ids = 1;
    }

    message FrecencyItem {
    message FrecencyItem {
    uint32 total_uses = 1;
    repeated uint64 recent_uses = 2 [packed = true];
    repeated uint64 recent_uses = 2;
    int32 frecency = 3;
    int32 score = 4;
    }
    }

    message StickerFrecency {
    message StickerFrecency {
    map<fixed64, FrecencyItem> stickers = 1;
    }
    }

    message FavoriteEmojis {
    repeated string emojis = 1 [packed = false];
    }
    message FavoriteEmojis {
    repeated string emojis = 1;
    }

    message EmojiFrecency {
    message EmojiFrecency {
    map<string, FrecencyItem> emojis = 1;
    }
    }

    message ApplicationCommandFrecency {
    message ApplicationCommandFrecency {
    map<string, FrecencyItem> application_commands = 1;
    }
    }

    message FrecencyUserSettings {
    Version versions = 1;
    FavoriteGIFs favorite_gifs = 2;
    FavoriteStickers favorite_stickers = 3;
    StickerFrecency sticker_frecency = 4;
    FavoriteEmojis favorite_emojis = 5;
    EmojiFrecency emoji_frecency = 6;
    ApplicationCommandFrecency application_command_frecency = 7;
    optional Versions versions = 1;
    optional FavoriteGIFs favorite_gifs = 2;
    optional FavoriteStickers favorite_stickers = 3;
    optional StickerFrecency sticker_frecency = 4;
    optional FavoriteEmojis favorite_emojis = 5;
    optional EmojiFrecency emoji_frecency = 6;
    optional ApplicationCommandFrecency application_command_frecency = 7;
    }
  2. RuslanUC created this gist Aug 28, 2022.
    64 changes: 64 additions & 0 deletions discord_FrecencyUserSettings.proto
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,64 @@
    syntax = "proto3";
    package discord_protos.discord_users.v1;

    message Version {
    uint32 client_version = 1;
    uint32 server_version = 2;
    uint32 data_version = 3;
    }

    enum GIFType {
    NONE = 0;
    IMAGE = 1;
    VIDEO = 2;
    }

    message FavoriteGIF {
    GIFType format = 1;
    string src = 2;
    uint32 width = 3;
    uint32 height = 4;
    uint32 order = 5;
    }

    message FavoriteGIFs {
    map<string, FavoriteGIF> gifs = 1;
    bool hide_tooltip = 2;
    }

    message FavoriteStickers {
    repeated fixed64 sticker_ids = 1 [packed = true];
    }

    message FrecencyItem {
    uint32 total_uses = 1;
    repeated uint64 recent_uses = 2 [packed = true];
    int32 frecency = 3;
    int32 score = 4;
    }

    message StickerFrecency {
    map<fixed64, FrecencyItem> stickers = 1;
    }

    message FavoriteEmojis {
    repeated string emojis = 1 [packed = false];
    }

    message EmojiFrecency {
    map<string, FrecencyItem> emojis = 1;
    }

    message ApplicationCommandFrecency {
    map<string, FrecencyItem> application_commands = 1;
    }

    message FrecencyUserSettings {
    Version versions = 1;
    FavoriteGIFs favorite_gifs = 2;
    FavoriteStickers favorite_stickers = 3;
    StickerFrecency sticker_frecency = 4;
    FavoriteEmojis favorite_emojis = 5;
    EmojiFrecency emoji_frecency = 6;
    ApplicationCommandFrecency application_command_frecency = 7;
    }