mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 02:08:27 -04:00
- Most if not all gambling commands should now use locale-specific currency format
- Enabled preview language features
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
using System.Globalization;
|
||||
using System.Runtime;
|
||||
|
||||
namespace NadekoBot.Modules.Gambling.Common;
|
||||
|
||||
@@ -37,6 +39,14 @@ public abstract class GamblingModule<TService> : NadekoModule<TService>
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected string N<T>(T cur) where T : INumber<T>
|
||||
{
|
||||
var flowersCi = (CultureInfo)Culture.Clone();
|
||||
flowersCi.NumberFormat.CurrencySymbol = CurrencySign;
|
||||
flowersCi.NumberFormat.CurrencyNegativePattern = 5;
|
||||
return cur.ToString("C0", flowersCi);
|
||||
}
|
||||
|
||||
protected Task<bool> CheckBetMandatory(long amount)
|
||||
{
|
||||
|
Reference in New Issue
Block a user