diff --git a/src/NadekoBot/Db/Extensions/DiscordUserExtensions.cs b/src/NadekoBot/Db/Extensions/DiscordUserExtensions.cs index 39ac0fd4b..eb7574d16 100644 --- a/src/NadekoBot/Db/Extensions/DiscordUserExtensions.cs +++ b/src/NadekoBot/Db/Extensions/DiscordUserExtensions.cs @@ -1,4 +1,5 @@ -using NadekoBot.Db.Models; +using System; +using NadekoBot.Db.Models; using System.Linq; using Microsoft.EntityFrameworkCore; using Discord; @@ -168,7 +169,7 @@ VALUES ({userId}, {name}, {discrim}, {avatarId}, {amount}, 0); public static decimal GetTotalCurrency(this DbSet users) { return users - .Sum(x => x.CurrencyAmount); + .Sum((Func)(x => x.CurrencyAmount)); } public static decimal GetTopOnePercentCurrency(this DbSet users, ulong botId) diff --git a/src/NadekoBot/Modules/Gambling/Gambling.cs b/src/NadekoBot/Modules/Gambling/Gambling.cs index 73d232d70..dc98a0ab4 100644 --- a/src/NadekoBot/Modules/Gambling/Gambling.cs +++ b/src/NadekoBot/Modules/Gambling/Gambling.cs @@ -66,11 +66,11 @@ namespace NadekoBot.Modules.Gambling } var embed = _eb.Create() .WithTitle(GetText(strs.economy_state)) - .AddField(GetText(strs.currency_owned), ((BigInteger)(ec.Cash - ec.Bot)) + CurrencySign) + .AddField(GetText(strs.currency_owned), ((BigInteger)(ec.Cash - ec.Bot)).ToString("N", _enUsCulture) + CurrencySign) .AddField(GetText(strs.currency_one_percent), (onePercent * 100).ToString("F2") + "%") .AddField(GetText(strs.currency_planted), ((BigInteger)ec.Planted) + CurrencySign) .AddField(GetText(strs.owned_waifus_total), ((BigInteger)ec.Waifus) + CurrencySign) - .AddField(GetText(strs.bot_currency), ec.Bot + CurrencySign) + .AddField(GetText(strs.bot_currency), ec.Bot.ToString("N", _enUsCulture) + CurrencySign) .AddField(GetText(strs.total), ((BigInteger)(ec.Cash + ec.Planted + ec.Waifus)).ToString("N", _enUsCulture) + CurrencySign) .WithOkColor(); // ec.Cash already contains ec.Bot as it's the total of all values in the CurrencyAmount column of the DiscordUser table