From afc1541865ea67d49be63e9c749224329876bef6 Mon Sep 17 00:00:00 2001 From: Toastie Date: Wed, 11 Dec 2024 12:35:17 +1300 Subject: [PATCH] added role icon to .inrole, .winlb will now show userids when user can't be found --- src/EllieBot/Modules/Gambling/BetStatsCommands.cs | 3 +++ src/EllieBot/Modules/Utility/Utility.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/EllieBot/Modules/Gambling/BetStatsCommands.cs b/src/EllieBot/Modules/Gambling/BetStatsCommands.cs index f58a0f9..76514bc 100644 --- a/src/EllieBot/Modules/Gambling/BetStatsCommands.cs +++ b/src/EllieBot/Modules/Gambling/BetStatsCommands.cs @@ -149,6 +149,9 @@ public partial class Gambling ?? (await _userService.GetUserAsync(x.UserId))?.Username ?? x.UserId.ToString(); + if (user.StartsWith("??")) + user = x.UserId.ToString(); + outputItems.Add(new WinLbStat(i + 1 + (page * 10), user, x.Game, x.MaxWin)); } diff --git a/src/EllieBot/Modules/Utility/Utility.cs b/src/EllieBot/Modules/Utility/Utility.cs index 356604a..790315c 100644 --- a/src/EllieBot/Modules/Utility/Utility.cs +++ b/src/EllieBot/Modules/Utility/Utility.cs @@ -186,7 +186,7 @@ public partial class Utility : EllieModule return CreateEmbed() .WithOkColor() - .WithTitle(GetText(strs.inrole_list(roleName, roleUsers.Count))) + .WithTitle(GetText(strs.inrole_list(role?.GetIconUrl() + roleName, roleUsers.Count))) .WithDescription(string.Join("\n", pageUsers)); }) .SendAsync();