Skip to content

.get_avatar_decoration_url() returns invalid URL #1418

Open
@ygr671

Description

@ygr671

Git commit reference

2ac5099

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions