#BannerUrl not working
1 messages · Page 1 of 1 (latest)
well the command is /banner [user]
so
the banner url
just like how AvatarUrl works
and its not working with me and other nitro users that have a banner
Could you show me your code?
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));
}
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
yes! it does work, thank you.
Interesting
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
as i thought
@round nimbus You can close the post now 😉
oh yea i forgor