Refactors. Cleanup. Refactored responses source gen a little. Parametrized localized strings are now generic. Refactored .cash bank interaction. Updated changelog. Reverted clubapps/ban/unban to use .ToString method and configured it to not have right to left unicode. Added extension methods to SocketMessageComponent akin to ones on the IMessageChannel (RespondConfirm, etc...)

This commit is contained in:
Kwoth
2022-05-05 22:59:07 +02:00
parent 9a96ef76ba
commit d80cbb4647
17 changed files with 341 additions and 110 deletions

View File

@@ -39,13 +39,19 @@ public abstract class GamblingModule<TService> : NadekoModule<TService>
return true;
}
public static string N(long cur, IFormatProvider format)
=> cur.ToString("C0", format);
public static string N(decimal cur, IFormatProvider format)
=> cur.ToString("C0", format);
protected string N(long cur)
=> cur.ToString("C0", GetFlowersCiInternal());
=> N(cur, GetFlowersCiInternal());
protected string N(decimal cur)
=> cur.ToString("C0", GetFlowersCiInternal());
=> N(cur, GetFlowersCiInternal());
private IFormatProvider GetFlowersCiInternal()
protected IFormatProvider GetFlowersCiInternal()
{
var flowersCi = (CultureInfo)Culture.Clone();
flowersCi.NumberFormat.CurrencySymbol = CurrencySign;