Skip to content

Regression in djs@14.19.0 resolving button emoji strings #10909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Luna-devv opened this issue May 22, 2025 · 0 comments
Open

Regression in djs@14.19.0 resolving button emoji strings #10909

Luna-devv opened this issue May 22, 2025 · 0 comments

Comments

@Luna-devv
Copy link

Which package is this bug report for?

discord.js

Issue description

reference: https://discord.com/channels/222078108977594368/824411059443204127/1369347560128512096

Sending a button component (components v1) with a string emoji (i.e.: emoji: "<:BlahajReach:1213502811870986321>") fails with data.components[0].components[0].emoji[MODEL_TYPE_CONVERT]: Expected an object/dictionary. This is due to Discord.JS no longer resolving "<:BlahajReach:1213502811870986321>" (emoji mardown) to an object for the Discord API, even though the Typescript types allow passing a string, and prior versions of DiscordJS supported that case. This seems to be a regression in discord.js@14.19.0.

Either please remove the string type definition, or properly resolve emoji strings again. This is very annoying, especially in a large code base.

Code sample

interaction.reply({
    components: [
        {
            type: ComponentType.ActionRow,
            components: [
                {
                    type: ComponentType.Button,
                    style: ButtonStyle.Link,
                    emoji: "<:BlahajReach:1213502811870986321>",
                    label: "Wamellow",
                    url: "https://wamellow.com"
                }
            ]
        }
    ]
});

Versions

  • discord.js @ 14.19.0, 14.19.1, 14.19.2, 14.19.3
  • bun @ 1.2.11, 1.2.12, 1.2.13
  • Linux @ 6.8.0-52-generic, 6.14.3-arch1-1

Issue priority

Medium (should be fixed soon)

Which partials do you have configured?

GuildMember, Message, Reaction

Which gateway intents are you subscribing to?

AutoModerationConfiguration, Guilds, GuildExpressions, GuildInvites, GuildMembers, GuildMessageReactions, GuildMessages, GuildVoiceStates, GuildWebhooks, MessageContent

I have tested this issue on a development release

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy