discord-api-docs icon indicating copy to clipboard operation
discord-api-docs copied to clipboard

`serialized_source_guild` in Guild Template returns the incorrect type for the `system_channel_id` field

Open kagadar opened this issue 7 months ago • 2 comments

Description

Using https://discord.com/developers/docs/resources/guild-template#get-guild-template the guild template object, https://discord.com/developers/docs/resources/guild-template#guild-template-resource, has a field serialized_source_guild, which is a guild object: https://discord.com/developers/docs/resources/guild#guild-object

This object has a field system_channel_id of type snowflake

According to https://discord.com/developers/docs/reference#snowflakes, the API should return these as a string, however the value returned by the API is a number.

Steps to Reproduce

New template that exhibits this behaviour: https://discord.com/api/v9/guilds/templates/5TA7DUe7aAEy

Expected Behavior

The system_channel_id should be a string.

Current Behavior

The system_channel_id is a number.

Screenshots/Videos

No response

Client and System Information

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

kagadar avatar Jan 08 '24 10:01 kagadar

Just to add to this, the initial report only specifies one snowflake field in the serialized_source_guild as impacted, but it seems like most, if not all, snowflake fields are returning numbers instead of strings.

kagadar avatar Jan 10 '24 21:01 kagadar

This behavior is intentional, but it's true that the docs are incorrect here.

appellation avatar Jan 10 '24 22:01 appellation