Skip to content

User settings Protobuf

A synced preferences snapshot holds the client preferences an account shares between its devices. It is one base64-encoded tebhos.user.preferences.v1.SyncedPreferences Protobuf message, stored in the synced_preferences field of the user settings object. TEBHOS stores the snapshot for clients and does not interpret any field on this page.

Reading and writing the snapshot

Decode the string before reading a preference, and encode a complete SyncedPreferences message when writing. Modify current user settings replaces the whole snapshot every time, so read, change and write back the full message.

  • The empty string in a response means nothing is stored. Sending null or "" clears it.
  • TEBHOS stores the submitted string exactly as sent and returns it unchanged. It does not re-encode the message.
  • A submission may use the standard or the URL-safe base64 alphabet, with or without padding.
  • A stored snapshot reaches the account's other sessions through USER_SETTINGS_UPDATE (see Gateway events) and is part of the settings in READY.
// Using protobuf-es generated code for tebhos/user/preferences/v1/preferences.proto
import { fromBinary, toBinary, create } from "@bufbuild/protobuf";
import { SyncedPreferencesSchema } from "./gen/tebhos/user/preferences/v1/preferences_pb";

const settings = await (await fetch("https://tebhos.com/api/v1/users/@me/settings", { headers })).json();
const bytes = Uint8Array.from(atob(settings.synced_preferences), (c) => c.charCodeAt(0));
const prefs = bytes.length ? fromBinary(SyncedPreferencesSchema, bytes) : create(SyncedPreferencesSchema);

prefs.sanitizeUrls = true;

const encoded = btoa(String.fromCharCode(...toBinary(SyncedPreferencesSchema, prefs)));
await fetch("https://tebhos.com/api/v1/users/@me/settings", {
  method: "PATCH",
  headers: { ...headers, "Content-Type": "application/json" },
  body: JSON.stringify({ synced_preferences: encoded }),
});

Validation

TEBHOS checks the snapshot without a schema:

Condition Result
Value is neither a string nor null 400 BAD_REQUEST (INVALID_FORMAT)
String is not valid base64 in any accepted alphabet 400 BAD_REQUEST (INVALID_FORMAT)
Decoded bytes exceed 262144 bytes (256 KiB) 400 BAD_REQUEST (TOO_LARGE)
Decoded bytes are not a well-formed Protobuf wire stream (unknown wire type, field number 0, truncated field) 400 BAD_REQUEST (INVALID_FORMAT)

Because no schema is applied, a well-formed message with fields outside this page is accepted and returned unchanged. Individual field values, lengths and enum ranges are not checked by the server; the constraints below describe what the TEBHOS client writes and expects.

How to read the type column

Types are the declared Protobuf types. Enumeration fields appear as int32 (their wire type) and link to the enumeration.

A field without the ? marker always decodes and holds its Protobuf zero value when unset: false, 0, the empty string, an empty list or an empty map. A field with ? is declared optional and tracks presence, so distinguish "absent" from a stored zero value before applying a default. Every message-typed field also tracks presence, so a preference group is absent until a client writes it.

Synced preferences object

SyncedPreferences is the root message. Field numbers are listed because they matter on the wire.

# Field Type Description
1 accessibility? accessibility settings Display, motion, message, media and interaction preferences
2 accessibility_overrides? accessibility overrides Dirty flags for media settings
3 textual_preview? textual preview settings Wrapping in textual attachment previews
20 emoji_picker? emoji picker state Emoji usage, favourites and collapsed categories
21 sticker_picker? sticker picker state Sticker usage, favourites and collapsed categories
22 memes_picker? memes picker state Meme usage, favourites and collapsed categories
23 emoji? emoji state Emoji skin tone
24 emoji_sticker_layout? emoji and sticker layout settings Picker layouts
25 favorite_gifs? favourite GIF settings Favourite GIFs
40 favorites? favourites state Favourite channels and categories
41 recent_mentions? recent mentions settings Recent mention filters
42 sidebar? sidebar preferences Direct message sidebar state
43 member_list? member list state Member list visibility
44 unread_channels? unread channels state Collapsed unread channels
45 mention_frecency? mention frecency state Per-guild mention frequency and recency
60 nagbars? nagbar dismissals Dismissed notices
61 dismissed_upsells? dismissed upsells Dismissed upsells
62 guild_nsfw_agreements? message Legacy field. TEBHOS has no age-restricted content; clients leave it unset
63 whats_new? what's new state Last dismissed update entry
80 privacy? privacy preferences Client privacy behaviour
81 local_spam_overrides? local user spam overrides Local spam classification overrides
82 sanitize_urls bool Whether tracking parameters are stripped from URLs in outgoing messages
100 sound? sound settings Sound enablement, volume and per-sound overrides
101 spellcheck? spellcheck settings Spellcheck preferences
102 search_engines? search engine settings External search and translation providers
103 permission_layout? permission layout settings Permission editor layout
104 guild_member_layout? guild member layout settings Guild member view layout
105 guild_folders? guild folder expanded state Which guild folders are expanded
106 hidden_guild_buttons? hidden guild list buttons Hidden guild list buttons
107 keyboard_mode_intro? keyboard mode intro state Keyboard navigation introduction
108 input_monitoring? input monitoring prompts state Input monitoring prompt
109 voice_prompts? voice prompts state Suppressed voice confirmation prompts
110 sudo_prompt? sudo prompt state Last used sudo verification method
111 keybinds? keybind settings Custom keybinds and transmit mode
112 chat_input? chat input settings Message composer behaviour

guild_folders here only records which folders are expanded. The folder layout itself is guild_folders on the user settings object.

Accessibility settings object

# Field Type Description
1 saturation_factor? double Colour saturation multiplier; 1 leaves colour unchanged
2 always_underline_links bool Always underline links
3 enable_text_selection? bool Allow selecting message text
4 show_message_send_button? bool Show a send button in the composer
5 show_textarea_focus_ring? bool Show a focus ring on the composer
6 hide_keyboard_hints bool Hide keyboard shortcut hints
7 escape_exits_keyboard_mode? bool Escape leaves keyboard navigation mode
8 sync_reduced_motion_with_system? bool Follow the operating system reduced-motion setting
9 reduced_motion_override? bool Explicit reduced-motion preference, used when not following the system
10 message_group_spacing? double Spacing between message groups, in CSS pixels
11 message_gutter? double Horizontal message gutter, in CSS pixels
12 font_size? double Message font size, in CSS pixels
13 show_user_avatars_in_compact_mode? bool Show avatars in compact mode
14 mobile_sticker_animation_overridden bool Whether the mobile sticker animation value applies on mobile layouts
15 mobile_gif_autoplay_overridden bool Whether the mobile GIF autoplay value applies on mobile layouts
16 mobile_animate_emoji_overridden bool Whether the mobile emoji animation value applies on mobile layouts
17 mobile_sticker_animation_value? int32 Mobile sticker animation setting
18 mobile_gif_autoplay_value? bool Mobile GIF autoplay value
19 mobile_animate_emoji_value? bool Mobile emoji animation value
20 auto_send_klipy_gifs bool Send a GIF as soon as it is selected
21 show_gif_button? bool Show the GIF button
22 show_memes_button? bool Show the memes button
23 show_stickers_button? bool Show the sticker button
24 show_emoji_button? bool Show the emoji button
25 show_media_favorite_button? bool Show the favourite button on media
26 show_media_download_button? bool Show the download button on media
27 show_media_delete_button? bool Show the delete button on media
28 show_suppress_embeds_button? bool Show the suppress embeds action
29 show_gif_indicator? bool Show a GIF indicator on GIF media
30 show_attachment_expiry_indicator? bool Show attachment expiry indicators
31 use_browser_locale_for_time_format? bool Use the browser locale for time formatting
32 channel_typing_indicator_mode int32 Channel typing indicator mode
33 show_selected_channel_typing_indicator? bool Show the typing indicator for the selected channel
34 show_message_action_bar? bool Show the message action bar
35 show_message_action_bar_quick_reactions? bool Show quick reactions in the action bar
36 show_message_action_bar_shift_expand? bool Holding Shift expands the action bar
37 show_message_action_bar_only_more_button? bool Show only the "more" button in the action bar
38 show_default_emojis_in_autocomplete? bool Include standard emoji in autocomplete
39 show_custom_emojis_in_autocomplete? bool Include custom emoji in autocomplete
40 show_stickers_in_autocomplete? bool Include stickers in autocomplete
41 show_memes_in_autocomplete? bool Include memes in autocomplete
42 attachment_media_dimension_size int32 Media dimension size for attachments
43 embed_media_dimension_size int32 Media dimension size for embeds
44 voice_channel_join_requires_double_click? bool Joining a voice channel needs a double click
45 custom_theme_css? string CSS of the account's synced custom theme
46 show_favorites? bool Show the favourites section
47 zoom_level? double Application zoom multiplier; 1 is unscaled
48 dm_message_preview_mode int32 Direct message preview mode
49 enable_tts_command? bool Enable the text-to-speech command
50 tts_rate? double Text-to-speech rate multiplier
51 show_faded_unread_on_muted_channels? bool Keep a faded unread marker on muted channels
52 show_context_menu_shortcuts? bool Show keyboard shortcuts in context menus
53 confirm_before_starting_calls? bool Ask before starting a call
54 hdr_display_mode int32 HDR display mode
55 preserve_edit_draft? bool Keep the draft when an edit is cancelled
56 stay_interactive_when_unfocused? bool Keep animation and interaction active while unfocused
57 confirm_before_joining_voice_channels? bool Ask before joining a voice channel
58 screen_reader_announce_new_messages? bool Screen readers announce new messages
59 first_click_pass_through_when_unfocused? bool The first click also activates its control while unfocused
60 compact_message_group_spacing? double Spacing between compact message groups, in CSS pixels
61 scroll_to_bottom_on_message_send? bool Scroll to the bottom after sending
62 dim_strikethrough_text? bool Dim strikethrough text
63 sequential_file_send? bool Send multiple selected files one message at a time

Channel typing indicator modes

Value Name Description
0 CHANNEL_TYPING_INDICATOR_MODE_UNSPECIFIED No explicit mode
1 CHANNEL_TYPING_INDICATOR_MODE_AVATARS Show typing users as avatars
2 CHANNEL_TYPING_INDICATOR_MODE_INDICATOR_ONLY Show an indicator without avatars
3 CHANNEL_TYPING_INDICATOR_MODE_HIDDEN Hide the typing indicator

Media dimension sizes

Value Name Description
0 MEDIA_DIMENSION_SIZE_UNSPECIFIED No explicit size
1 MEDIA_DIMENSION_SIZE_SMALL Small media previews
2 MEDIA_DIMENSION_SIZE_LARGE Large media previews

Direct message preview modes

Value Name Description
0 DM_MESSAGE_PREVIEW_MODE_UNSPECIFIED No explicit mode
1 DM_MESSAGE_PREVIEW_MODE_ALL Previews for all direct messages
2 DM_MESSAGE_PREVIEW_MODE_UNREAD_ONLY Previews only for unread direct messages
3 DM_MESSAGE_PREVIEW_MODE_NONE No previews

HDR display modes

Value Name Description
0 HDR_DISPLAY_MODE_UNSPECIFIED No explicit mode
1 HDR_DISPLAY_MODE_FULL Show HDR media at full range
2 HDR_DISPLAY_MODE_STANDARD Limit HDR media to standard range

Accessibility overrides object

# Field Type Description
1 gif_autoplay_dirty bool GIF autoplay dirty flag
2 animate_emoji_dirty bool Emoji animation dirty flag
3 animate_stickers_dirty bool Sticker animation dirty flag

Textual preview settings object

# Field Type Description
1 wrap_text bool Wrap long lines in textual attachment previews

Usage stat object

The map value of every picker's usage field.

# Field Type Description
1 count uint32 Number of recorded uses
2 last_used_ms int64 Unix time in milliseconds of the last use

Emoji picker state object

# Field Type Description
1 usage map[string, usage stat] Usage keyed by emoji key
2 favorite_emoji_ids array[string] Favourite emoji keys in display order
3 collapsed_category_ids array[string] Collapsed picker categories

Sticker picker state object

# Field Type Description
1 usage map[string, usage stat] Usage keyed by sticker ID
2 favorite_sticker_ids array[string] Favourite sticker IDs in display order
3 collapsed_category_ids array[string] Collapsed picker categories

Memes picker state object

The memes themselves belong to the account's memes collection.

# Field Type Description
1 usage map[string, usage stat] Usage keyed by meme ID
2 favorite_meme_ids array[string] Favourite meme IDs in display order
3 collapsed_category_ids array[string] Collapsed picker categories

Emoji state object

# Field Type Description
1 skin_tone string Selected Unicode skin tone modifier (U+1F3FB to U+1F3FF); the empty string is the default tone

Emoji and sticker layout settings object

# Field Type Description
1 emoji_layout int32 Emoji picker layout
2 sticker_view_mode int32 Sticker picker view mode

Emoji picker layouts

Value Name Description
0 EMOJI_PICKER_LAYOUT_UNSPECIFIED No explicit layout
1 EMOJI_PICKER_LAYOUT_LIST List layout
2 EMOJI_PICKER_LAYOUT_GRID Grid layout

Sticker picker view modes

Value Name Description
0 STICKER_PICKER_VIEW_MODE_UNSPECIFIED No explicit view mode
1 STICKER_PICKER_VIEW_MODE_COZY Roomy layout
2 STICKER_PICKER_VIEW_MODE_COMPACT Compact layout

Favourite GIF settings object

# Field Type Description
1 entries array[favourite GIF entry] Favourite GIFs in display order
2 save_as_saved_media bool Favourite GIFs into the memes collection instead of this list
3 seen_first_time_prompt bool Whether the first-time favourite prompt was shown

Favourite GIF entry object

# Field Type Description
1 url string Source URL of the GIF; identifies the entry
2 proxy_url string Media proxy URL of the preview
3 width uint32 Preview width in pixels, 0 when unknown
4 height uint32 Preview height in pixels, 0 when unknown
5 media map[string, favourite GIF media format] Formats keyed by format name
6 content_type string Media type of the preview; empty when unknown
7 placeholder string Compact thumbhash placeholder; empty when none

Favourite GIF media format object

# Field Type Description
1 src string Direct media URL of this format
2 proxy_src string Media proxy URL of this format
3 width uint32 Width in pixels
4 height uint32 Height in pixels

Favourites state object

# Field Type Description
1 channels array[favourite channel] Favourite channels
2 categories array[favourite category] Favourite categories
3 collapsed_category_ids array[string] Collapsed favourite categories
4 hide_muted_channels bool Hide muted channels from favourites
5 muted bool Whether the favourites collection is muted

Favourite channel object

IDs are decimal snowflake strings. Entries are not removed when the account loses access to a channel.

# Field Type Description
1 channel_id string Channel ID
2 guild_id string Guild ID
3 parent_id? string id of the favourite category the channel is grouped under
4 position int32 Position across the whole favourites list
5 nickname? string User-assigned channel nickname

Favourite category object

The identifier is chosen by the client and is not a snowflake.

# Field Type Description
1 id string Category identifier
2 name string Category name
3 position int32 Category position

Recent mentions settings object

Filters for the recent mentions view. Treat an absent filter as "include", not as the Protobuf zero value.

# Field Type Description
1 include_everyone? bool Include @everyone mentions
2 include_roles? bool Include role mentions
3 include_guilds? bool Include mentions in guild channels
# Field Type Description
1 inline_dms_collapsed bool Whether the inline DM section is collapsed
2 show_collapsed_unread_dms_badge? bool Show an unread DM badge while collapsed
3 show_incoming_friend_request_badge? bool Show an incoming friend request badge

Member list state object

# Field Type Description
1 members_open? bool Whether the member list is open

Unread channels state object

# Field Type Description
1 collapsed_channel_ids array[string] Collapsed channel IDs

Mention frecency state object

Per-guild records of how often and how recently the account mentioned each user, used to rank mention autocomplete locally.

# Field Type Description
1 scopes array[mention frecency scope] One scope per guild

Mention frecency scope object

Declared as MentionFrecencyState.Scope.

# Field Type Description
1 guild_id string Guild ID
2 entries array[mention frecency entry] Records for the guild

Mention frecency entry object

Declared as MentionFrecencyState.Entry.

# Field Type Description
1 user_id string Mentioned user ID
2 count uint32 Number of mentions
3 last_at_ms int64 Unix time in milliseconds of the last mention

Nagbar dismissals object

Field number 13 is not assigned.

# Field Type Description
1 ios_install bool iOS install notice dismissed
2 pwa_install bool Web app install notice dismissed
3 push_notification bool Push notification notice dismissed
4 desktop_notification bool Desktop notification notice dismissed
5 premium_grace_period bool Premium grace period notice dismissed
6 premium_expired bool Premium expiry notice dismissed
7 premium_onboarding bool Premium onboarding notice dismissed
8 premium_trial_expiring bool Premium trial expiry notice dismissed
9 gift_inventory bool Gift inventory notice dismissed
10 desktop_download bool Desktop download notice dismissed
11 guild_membership_cta bool Guild membership notice dismissed
12 visionary_mfa bool Lifetime premium MFA notice dismissed
14 legacy_phone_unlink bool Legacy phone unlink notice dismissed
15 pending_bulk_deletion map[string, bool] Dismissals keyed by pending bulk deletion
16 invites_disabled map[string, bool] Disabled-invite notice dismissals keyed by guild ID
17 guild_mfa_requirement map[string, bool] MFA requirement notice dismissals keyed by guild ID

Dismissed upsells object

# Field Type Description
1 picker_premium bool Premium upsell in the pickers dismissed

What's new state object

# Field Type Description
1 last_dismissed_entry_id? string Most recently dismissed update entry

Privacy preferences object

Client-side behaviour only. It does not change the privacy fields of the user settings object, which control what TEBHOS discloses about the account.

# Field Type Description
1 disable_stream_previews bool Do not upload stream preview frames
2 show_active_now? bool Show the active-now view
3 preupload_message_attachments? bool Upload attachments before the message is sent

Local user spam overrides object

Local display overrides of the SPAMMER public user flag. TEBHOS does not read them and no flag changes because of them.

# Field Type Description
1 spammer_user_ids array[string] Users shown locally as spammers
2 not_spammer_user_ids array[string] Users shown locally as not spammers; wins over the other list and the flag

Sound settings object

# Field Type Description
1 all_sounds_disabled bool Disable every application sound
2 master_volume? double Master volume as a percentage
3 disabled_sounds map[string, bool] Disabled state keyed by sound identifier
4 sound_overrides map[string, double] Per-sound volume percentage keyed by sound identifier

Sound identifiers

Both maps accept any key. The TEBHOS client uses these:

Value Description
deaf Deafen
undeaf Undeafen
mute Mute
unmute Unmute
message Message notification
direct-message Direct message notification
same-channel-message Notification for the channel already in view
incoming-ring Incoming call
user-join Voice participant joined
user-leave Voice participant left
user-move Voice participant moved
viewer-join Stream viewer joined
viewer-leave Stream viewer left
voice-disconnect Voice disconnected
camera-on Camera turned on
camera-off Camera turned off
screen-share-start Screen share started
screen-share-stop Screen share stopped

Spellcheck settings object

# Field Type Description
1 enabled? bool Enable spellchecking
2 languages array[string] Selected spellcheck languages
3 personal_dictionary array[string] Words in the personal dictionary
4 auto_detect? bool Detect the language automatically
5 engine? string Spellcheck engine identifier

Search engine settings object

Identifiers name providers defined by the client.

# Field Type Description
1 text_search_engine_id? string Text search engine
2 reverse_image_search_engine_id? string Reverse image search engine
3 translation_provider_id? string Translation provider

Permission layout settings object

Layout of the permission editor.

# Field Type Description
1 layout int32 Permission layout mode
2 grid int32 Permission grid mode

Permission layout modes

Value Name Description
0 PERMISSION_LAYOUT_MODE_UNSPECIFIED No explicit layout
1 PERMISSION_LAYOUT_MODE_COMFY Roomy layout
2 PERMISSION_LAYOUT_MODE_DENSE Dense layout

Permission grid modes

Value Name Description
0 PERMISSION_GRID_MODE_UNSPECIFIED No explicit grid mode
1 PERMISSION_GRID_MODE_SINGLE One category at a time
2 PERMISSION_GRID_MODE_GRID Categories in a grid

Guild member layout settings object

# Field Type Description
1 mode int32 Guild member view mode

Guild member view modes

Value Name Description
0 GUILD_MEMBER_VIEW_MODE_UNSPECIFIED No explicit mode
1 GUILD_MEMBER_VIEW_MODE_TABLE Table view
2 GUILD_MEMBER_VIEW_MODE_GRID Grid view

Guild folder expanded state object

# Field Type Description
1 expanded_folder_ids array[fixed64] id values of expanded guild folders

Hidden guild list buttons object

# Field Type Description
1 download_button bool Hide the download button
2 help_button bool Hide the help button

Keyboard mode intro state object

# Field Type Description
1 seen bool The keyboard navigation introduction was seen

Input monitoring prompts state object

# Field Type Description
1 seen_cta bool The input monitoring prompt was seen

Voice prompts state object

# Field Type Description
1 skip_hide_own_camera_confirm bool Hiding your own camera skips confirmation
2 skip_hide_own_screenshare_confirm bool Hiding your own screen share skips confirmation

Sudo prompt state object

Lets a client preselect the method the next time sudo verification is needed.

# Field Type Description
1 last_used_mfa_method? int32 MFA method used most recently

MFA methods

Value Name Description
0 MFA_METHOD_UNSPECIFIED No method recorded
1 MFA_METHOD_TOTP Authenticator app code
3 MFA_METHOD_WEBAUTHN Passkey

The value 2 is not assigned.

Keybind settings object

# Field Type Description
1 custom_keybinds array[custom keybind] Custom keybinds
2 transmit_mode string Voice transmit mode: voice_activity or voice_push_to_talk
3 push_to_talk_release_delay_ms? uint32 Push-to-talk release delay in milliseconds

Custom keybind object

# Field Type Description
1 id string Keybind identifier chosen by the client
2 action? string Action performed by the keybind
3 combo? keybind combo Input combination
4 enabled bool Whether the keybind is enabled

Keybind combo object

# Field Type Description
1 key string Key value
2 code? string Physical key code
3 ctrl_or_meta bool Requires Control, or Meta on macOS
4 ctrl bool Requires Control
5 alt bool Requires Alt
6 shift bool Requires Shift
7 meta bool Requires Meta
8 global? bool Registered as a global shortcut (desktop)
9 enabled? bool Whether the combination is active
10 modifier_only bool The combination has only modifier keys
11 both_sides bool Either side of a paired modifier is accepted
12 mouse_button? uint32 Mouse button number
13 gamepad_button? uint32 Gamepad button number

Chat input settings object

# Field Type Description
1 convert_emoticons? bool Convert emoticons such as :) to emoji