diff --git a/src/EllieBot/Modules/Games/Fish/FishService.cs b/src/EllieBot/Modules/Games/Fish/FishService.cs index 09deb17..90fc2e9 100644 --- a/src/EllieBot/Modules/Games/Fish/FishService.cs +++ b/src/EllieBot/Modules/Games/Fish/FishService.cs @@ -469,22 +469,23 @@ public sealed class FishService( return catches; } - public async Task<IReadOnlyCollection<(ulong UserId, int Catches)>> GetFishLbAsync(int page) + public async Task<IReadOnlyCollection<(ulong UserId, int Catches, int Unique)>> GetFishLbAsync(int page) { await using var ctx = db.GetDbContext(); var result = await ctx.GetTable<FishCatch>() .GroupBy(x => x.UserId) - .OrderByDescending(x => x.Sum(x => x.Count)) + .OrderByDescending(x => x.Count()) .Skip(page * 10) .Take(10) .Select(x => new { UserId = x.Key, - Catches = x.Sum(x => x.Count) + Catches = x.Sum(x => x.Count), + Unique = x.Count() }) .ToListAsyncLinqToDB() - .Fmap(x => x.Map(y => (y.UserId, y.Catches))); + .Fmap(x => x.Map(y => (y.UserId, y.Catches, y.Unique)).ToList()); return result; } diff --git a/src/EllieBot/Modules/Games/Fish/FishingCommands.cs b/src/EllieBot/Modules/Games/Fish/FishingCommands.cs index eb62b9f..fadf4bf 100644 --- a/src/EllieBot/Modules/Games/Fish/FishingCommands.cs +++ b/src/EllieBot/Modules/Games/Fish/FishingCommands.cs @@ -235,8 +235,14 @@ public partial class Games ? ud.ToString() : data.UserId.ToString(); + var text = + $""" + {GetText(strs.fish_unique(Format.Bold(data.Unique.ToString())))} + *{GetText(strs.fish_catches(data.Catches))}* + """; + eb.AddField("#" + (page * 9 + i + 1) + " | " + user, - GetText(strs.fish_catches(Format.Bold(data.Catches.ToString()))), + text, false); } diff --git a/src/EllieBot/strings/responses/responses.en-US.json b/src/EllieBot/strings/responses/responses.en-US.json index fea5dad..74d556e 100644 --- a/src/EllieBot/strings/responses/responses.en-US.json +++ b/src/EllieBot/strings/responses/responses.en-US.json @@ -1260,5 +1260,6 @@ "fish_inv_title": "Fishing Inventory", "fish_cant_uneq_potion": "You can't unequip a potion.", "fish_lb_title": "Fishing Leaderboard", + "fish_unique": "Caught {0} unique fish", "fish_catches": "{0} catches" } \ No newline at end of file