Skip to content

Commit

Permalink
chore: add thumbnail & footer to moderation leaderboard cmd embed
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanpth committed Sep 10, 2024
1 parent 61f634a commit b46ea1f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/AdvancedBot.Core/Commands/Modules/ModerationModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,11 @@ public async Task GetLeaderboardAsync([
List<string> displayTexts = new() { "Failed to get information" };
var title = "Galaxy Life Leaderboard";

var thumbnailUrl =
Context.Channel is IGuildChannel
? Context.Guild.IconUrl
: Context.Client.CurrentUser.GetDisplayAvatarUrl();

switch (type)
{
case "attackXp":
Expand Down Expand Up @@ -631,7 +636,12 @@ public async Task GetLeaderboardAsync([

var embed = new EmbedBuilder()
.WithTitle($"Leaderboard | {title}")
.WithColor(Color.Purple);
.WithColor(Color.Purple)
.WithThumbnailUrl(thumbnailUrl)
.WithFooter(footer => footer
.WithText($"Leaderboard requested by {Context.User.Username}#{Context.User.Discriminator}")
.WithIconUrl(Context.User.GetDisplayAvatarUrl()))
.WithCurrentTimestamp();

await SendPaginatedMessageAsync(null, displayTexts, embed);

Expand Down

0 comments on commit b46ea1f

Please sign in to comment.