discord / discord-api-docs

Official Discord API Documentation
https://discord.com/developers/docs/intro
Other
5.97k stars 1.27k forks source link

Emoji in Onboarding Option Prompt are inconsistent in data #7006

Open Doc94 opened 4 months ago

Doc94 commented 4 months ago

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

sklein12 commented 4 months ago

@Doc94 Which onboarding prompt?

Doc94 commented 4 months ago

@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.

sklein12 commented 4 months ago

got it, thank you for the detail! Super helpful.

Doc94 commented 3 months ago

A update about that... I check now in UI and the emote looks but when click for details not appear. image image

set again the emote looks like fix the response of API but its strange how in first place this happen.

DV8FromTheWorld commented 3 months ago

Is this still happening?

Doc94 commented 3 months ago

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
}

image image

DV8FromTheWorld commented 3 months ago

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.

Doc94 commented 3 months ago

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.

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.