0
votes

Hi I was wondering if anyone knew how to make my c# bot get a senders avatar and then have it reply with the users avatar in the message. Here is what I have:

    [Command("testuser")]
    public async Task testuser()
    {
        EmbedBuilder builder = new EmbedBuilder();

        builder.WithTitle("Message response")
            .WithDescription("Message" + **SENDERS USER AVATAR HERE**);

        await ReplyAsync("", false, builder.Build());
    }

I tried using:

.withurl() and .withimageurl()combined with Context.User.GetAvatarUrl and Context.User.AvatarId

But none of those worked, please help

Here is an example of what I want it to look like

1

1 Answers

1
votes

The EmbedBuilder.WithDescription() doesn't allow you to add images to the content of an embed's description, if what you want is for the embed to look like the screenshot you linked, then you have to use

builder.WithFooter($"Help requested by {Context.User.Username}", Context.User.GetAvatarUrl());