#BannerUrl not working

1 messages · Page 1 of 1 (latest)

drowsy dirge
#

@round nimbus Are you trying to get a user profile banner?

round nimbus
#

so

#

the banner url

#

just like how AvatarUrl works

#

and its not working with me and other nitro users that have a banner

drowsy dirge
#

Could you show me your code?

round nimbus
#

sure

#
[SlashCommand("banner", "Shows a users banner", false)]
        public async Task banner(InteractionContext ctx,
        [Option("user", "The users banner you want to see")] DiscordUser user)
        {
            await ctx.CreateResponseAsync(InteractionResponseType.ChannelMessageWithSource, new DiscordInteractionResponseBuilder()
                .WithContent($"{user.BannerUrl}").AsEphemeral(true));
        }
drowsy dirge
#

Add

var fetchUser = await ctx.Client.GetUserAsync(user.Id, true);

and change your .WithContent($"{user.BannerUrl}") to .WithContent($"{fetchUser.BannerUrl}") and tell me if that works

round nimbus
drowsy dirge
#

Interesting

round nimbus
#

so i see that you have to get the user, may i ask why do you have to do that?

#

and not with avatar url

drowsy dirge
round nimbus
#

as i thought

drowsy dirge
#

@round nimbus You can close the post now 😉

round nimbus
#

oh yea i forgor