DPP icon indicating copy to clipboard operation
DPP copied to clipboard

.get_avatar_decoration_url() returns invalid URL

Open ygr671 opened this issue 8 months ago • 1 comments

Git commit reference

2ac50995af4c1d45d2a5be64595c5018f6cbde07

Describe the bug

I was trying to implement a 'user-info' command in my bot retrieving the decoration and encountered into this bug. Returns an invalid decoration URL (404).

To Reproduce Create a slashcommand like :

if (event.command.get_command_name() == "user-info")
        {
            dpp::snowflake userID = std::get<dpp::snowflake>(event.get_parameter("user"));

            auto callbackResponse = [&bot, event](const dpp::confirmation_callback_t &callback)
            {
                const dpp::user_identified target_user = std::get<dpp::user_identified>(callback.value);

                dpp::embed embed = dpp::embed()
                    .set_color(dpp::colors::red)
                    .set_title("informations about " + target_user.username)
                    .set_thumbnail(target_user.get_avatar_url(4096, dpp::i_png, true))
                    .add_field(
                        "Username",
                        target_user.username
                            )
                    .add_field(
                        "Decoration",
                        target_user.get_avatar_decoration_url(4096)
                            );

                dpp::message msg(event.command.channel_id, embed);

                event.reply(msg);

            };

            bot.user_get(userID, callbackResponse);
        }

Then use your slashcommand as it should, returns an embed containing the link but it doesn't work. Whether user has a decoration or not.

Expected behavior

Returning an URL to the avatar decoration.

Screenshots

Embed screenshot :

Image

Given url screenshot :

Image

System Details:

  • OS: [e.g. Debian Bullseye] : Raspberry Pi OS 64 Bits for the bot, Windows 11 for the client
  • Discord Client used for testing [mobile, desktop, web] : desktop

ygr671 avatar Apr 17 '25 15:04 ygr671

This issue has had no activity and is being marked as stale. If you still wish to continue with this issue please comment to reopen it.

github-actions[bot] avatar Jun 17 '25 03:06 github-actions[bot]

bumped

braindigitalis avatar Jun 19 '25 06:06 braindigitalis