discord-api-docs
discord-api-docs copied to clipboard
Emoji in Onboarding Option Prompt are inconsistent in data
Description
Currently https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure mention name can be null only for reactions but thats not include Onboarding promt option where this can happen too.
Steps to Reproduce
N/A
Expected Behavior
Mention about onboarding can have emoji with null name
Current Behavior
N/A
Screenshots/Videos
No response
Client and System Information
N/A
@Doc94 Which onboarding prompt?
@Doc94 Which onboarding prompt?
Using https://discord.com/developers/docs/resources/guild#get-guild-onboarding and get the whole Onboarding object i get emoji fields with null name. ex of a prompt in a discord server i manage.
{
"id": "1071078808301613068",
"title": "¿Cual es tu interés en el servidor?",
"options": [
{
"id": "1071078808301613071",
"title": "Social",
"description": "Quieres conversar con la gente libremente sin estar ligado a la tematica del servidor.",
"emoji": {
"id": null,
"name": "💬",
"animated": false
},
"role_ids": [],
"channel_ids": [
"405699020564987916"
]
},
{
"id": "1071078808301613072",
"title": "Dudas y Reportes",
"description": "Quieres ayudar, tienes dudas sobre el juego o quieres reportar un problema dentro del mismo",
"emoji": {
"id": null,
"name": "❓",
"animated": false
},
"role_ids": [],
"channel_ids": [
"1019965177162104832",
"1019809863213252659"
]
},
{
"id": "1071078808301613073",
"title": "Battle Royale",
"description": "Quieres charlar sobre este modo de juego o compartir contenido del mismo.",
"emoji": {
"id": "584304129136918560",
"name": null,
"animated": false
},
"role_ids": [],
"channel_ids": [
"406072697320374290"
]
},
{
"id": "1071078808301613074",
"title": "Creativo",
"description": "Quieres charlar sobre este modo de juego o compartir contenido del mismo.",
"emoji": {
"id": "669333907090440222",
"name": null,
"animated": false
},
"role_ids": [],
"channel_ids": [
"1154046881450704936",
"520314772651245573"
]
},
{
"id": "1071078808301613075",
"title": "Salvar el Mundo",
"description": "Quieres charlar sobre este modo de juego o compartir contenido del mismo.",
"emoji": {
"id": "535033681371201537",
"name": null,
"animated": false
},
"role_ids": [],
"channel_ids": [
"911415400342913114"
]
},
{
"id": "1182320104927674384",
"title": "Lego",
"description": "Para informarte de las ultimas novedades o compartir contenido de este modo.",
"emoji": {
"id": null,
"name": "🪚",
"animated": false
},
"role_ids": [],
"channel_ids": [
"1182315608109490287"
]
},
{
"id": "1182415825223827511",
"title": "Rocket Racing",
"description": "Para informarte de las ultimas novedades o compartir contenido de este modo.",
"emoji": {
"id": "1183209820489273374",
"name": "fnes_racing_flag",
"animated": false
},
"role_ids": [],
"channel_ids": [
"1182415299673338036"
]
},
{
"id": "1182415825223827512",
"title": "Festival",
"description": "Para informarte de las ultimas novedades o compartir contenido de este modo.",
"emoji": {
"id": null,
"name": "🎸",
"animated": false
},
"role_ids": [],
"channel_ids": [
"1182415043044839505"
]
}
],
"single_select": false,
"required": false,
"in_onboarding": true,
"type": 0
}
the emote id "535033681371201537" has null name in onboarding but checking the endpoint for discord guild that emote exists and has a name.
{
"id": "535033681371201537",
"name": "fnes_mats3",
"roles": [],
"require_colons": true,
"managed": false,
"animated": true,
"available": true
}
and now i check the emoji show in onboarding show its not animated but guild info yes, and checking the server emojis its animated.
got it, thank you for the detail! Super helpful.
A update about that...
I check now in UI and the emote looks but when click for details not appear.
set again the emote looks like fix the response of API but its strange how in first place this happen.
Is this still happening?
Is this still happening?
i dont fully check all emojis.. i check now in same guild 405699020564987914 and notice has more emotes with the same issue a complete prompt with emoji with null name and false enimated (the false animated in this case is correct but based in the original issue this field come from default when this happen)..
{
"id": "1054558400593272899",
"title": "¿En que plataformas juegas?",
"options": [
{
"id": "1054558400593272902",
"title": "PC",
"description": "",
"emoji": {
"id": "500711677558521856",
"name": null,
"animated": false
},
"role_ids": [
"911398002361520198"
],
"channel_ids": []
},
{
"id": "1054558400593272903",
"title": "XBOX",
"description": "",
"emoji": {
"id": "500711677939941379",
"name": null,
"animated": false
},
"role_ids": [
"911398275800784896"
],
"channel_ids": []
},
{
"id": "1054558400635228282",
"title": "PlayStation",
"description": "",
"emoji": {
"id": "500711678196056093",
"name": null,
"animated": false
},
"role_ids": [
"911398373213495346"
],
"channel_ids": []
},
{
"id": "1054558400635228283",
"title": "Switch",
"description": "",
"emoji": {
"id": "500711677575299085",
"name": null,
"animated": false
},
"role_ids": [
"911398481925640211"
],
"channel_ids": []
},
{
"id": "1054558400635228284",
"title": "Movil",
"description": "",
"emoji": {
"id": "500711677579231262",
"name": null,
"animated": false
},
"role_ids": [
"911398606769106946"
],
"channel_ids": []
}
],
"single_select": false,
"required": false,
"in_onboarding": true,
"type": 0
}
I can repro this.
It is possible currently to create an onboarding prompt and provide emoji_id but also provide emoji_name as null. This is, of course, incorrect. We need to update the validation rules here.
The client shouldn't be causing this problem based on what I'm seeing, so it is likely a bot that is updating the prompts and doing it incorrectly.
I can repro this. It is possible currently to create an onboarding prompt and provide
emoji_idbut also provideemoji_nameas null. This is, of course, incorrect. We need to update the validation rules here.The client shouldn't be causing this problem based on what I'm seeing, so it is likely a bot that is updating the prompts and doing it incorrectly.
that is strange because the whole onboarding was making using the client time ago and last updates with client to, for API i just use for get info and not modify.
Hi, just adding some clarification from my side.
As mentioned earlier and supported by my own findings, the current Discord API documentation doesn't account for a valid scenario where an onboarding prompt option's emoji field can have both id and name set to null. While the emoji object docs state that name can be null only for reactions, this behavior also occurs in onboarding prompts.
Here's a response from the API I received on my testing guild:
{"guild_id":"851956220570370099","prompts":[{"id":"1399029801909747805","title":"Was soll in dieser Community gemacht werden?","options":[{"id":"1399029801909747808","title":"Test","description":"","emoji":{"id":null,"name":null,"animated":false},"role_ids":["1395555671851794624"],"channel_ids":[]},{"id":"1399029801909747809","title":"Standard Emoji","description":"","emoji":{"id":null,"name":"\ud83d\udc4d","animated":false},"role_ids":["1396031305795371109"],"channel_ids":[]},{"id":"1399029801909747810","title":"Custom Emoji","description":"","emoji":{"id":"852655341967507506","name":"p_normal_1","animated":false},"role_ids":["1394112388239724594"],"channel_ids":[]}],"single_select":false,"required":false,"in_onboarding":true,"type":0}],"default_channel_ids":["1241095814168711168"],"enabled":true,"mode":0,"below_requirements":false}
The relevant part being this emoji structure if no emoji is set:
"emoji": {
"id": null,
"name": null,
"animated": false
}
This object appears when no emoji is assigned to a prompt option. However, instead of omitting the emoji field or setting it to null, the API returns a full object with null values inside which causes issues during deserialization, especially in strongly typed libraries. This suggests the API response structure is inconsistent with what's expected based on the docs. Suggestions:
- The docs should be updated to clarify that in onboarding prompts, emoji.name (and even emoji.id) can be null.
- Alternatively, if an emoji is not present, it might be better for the API to omit the emoji field altogether, or return null instead of a partially defined object.
Also, just to clarify, i created the onboarding setup entirely using the official Discord client, not through any bot or custom API call. So it seems the client may allow saving invalid or incomplete emoji states, even though that shouldn't happen.