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:
@@ -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 "";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user