Skip to content

certain instances of public_flags are sent as the wrong data type #1553

@gizmogoat

Description

@gizmogoat

Describe the bug
The public_flags (and perhaps other) parameters when sent to connecting clients over the Gateway websocket and certain API endpoints like api/v9/channels/channelId/webhooks are sent as strings and not ints.
So, when using DiscordGo, it complains about public_flags being a string.

To Reproduce
Steps to reproduce the behavior:

  1. Do anything that tries to deserialize these fields into an int. (i.e. DiscordGo)

Expected behavior
Sent value is an int. Library/client/bot does not complain about the data types

Console Logs
Feb 23 11:43:11 sike matterbridge[2246857]: 2026/02/23 11:43:11 [DG0] wsapi.go:646:onEvent() error unmarshalling MESSAGE_CREATE event, json: cannot unmarshal string into Go struct field User.message.author.public_flags of type discordgo.UserFlags

Image

System Information (please complete the following information):

  • OS: Ubuntu
  • Version (If not applicable skip): 24.04
  • Node Version: 24.13.1
  • Python 3 Version: Python 3.13.12

Env and Software info

  • Release: nightly
  • Branch (if release is not applicable): master
  • Commit Hash (if release is not applicable): 785f53e
  • Database: 16.11
  • Reverse Proxy: cloudflared
  • Thread Count: default

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions