implement a summary line

For Pony's bot, implement a summary line that just shows the highlights of the log
This commit is contained in:
2023-02-23 21:44:55 +01:00
parent 3c1abe5e8c
commit 5120c7991f
15 changed files with 234 additions and 3 deletions

View File

@@ -34,4 +34,16 @@ public class Credits {
return string.Format("{0} CR", amount.ToString("N", format));
}
public static string FormatMillions(long amount) {
double millions = (amount / 1000000.0);
if (amount >= 100000) {
return string.Format("{0:0.0}M", millions);
} else if (amount >= 10000) {
return string.Format("{0:0.00}M", millions);
}
return "";
}
}