Open
Description
Git commit reference
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 :
Given url screenshot :
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