mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Updated the formatting to make the juice stats command more legible
This commit is contained in:
@@ -82,14 +82,14 @@ public class JuiceStatsCommand : ICommand
|
|||||||
var sum = await db.Juicers.SumAsync(s => s.Amount, cancellationToken: ctx);
|
var sum = await db.Juicers.SumAsync(s => s.Amount, cancellationToken: ctx);
|
||||||
var count = await db.Juicers.CountAsync(ctx);
|
var count = await db.Juicers.CountAsync(ctx);
|
||||||
var totalUsers = await db.Juicers.Select(j => j.User).Distinct().CountAsync(ctx);
|
var totalUsers = await db.Juicers.Select(j => j.User).Distinct().CountAsync(ctx);
|
||||||
var msg = $"Total Juicers: {count:N0}; Total Handed Out: KKK{sum:C}; Total Users Juiced: {totalUsers:N0}; Average Juicers / User: {count / totalUsers:N}[br]Top Leeches: ";
|
var msg = $"Total Juicers: {count:N0}; Total Handed Out: {sum:C0}; Total Users Juiced: {totalUsers:N0}; Average Juicers / User: {count / totalUsers:N0}[br]Top Leeches: ";
|
||||||
var i = 0;
|
var i = 0;
|
||||||
foreach (var leech in topLeeches)
|
foreach (var leech in topLeeches)
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
msg += $"{i}. {leech.User} with KKK{leech.Amount:C} juiced; ";
|
msg += $"[b]{i}.[/b] {leech.User} with {leech.Amount:C0} juiced; ";
|
||||||
}
|
}
|
||||||
|
|
||||||
botInstance.SendChatMessage(msg, true);
|
botInstance.SendChatMessage(msg.TrimEnd().TrimEnd(';'), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user