mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38:27 -04:00
.bank withdraw <expression> will now correctly use bank amount for calculations. Fixed .br giving double win amounts
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Nadeko.Common;
|
||||
using NadekoBot.Common.TypeReaders;
|
||||
using NadekoBot.Modules.Gambling.Bank;
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
@@ -35,7 +36,7 @@ public partial class Gambling
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async Task BankWithdraw(ShmartNumber amount)
|
||||
public async Task BankWithdraw(ShmartBankAmount amount)
|
||||
{
|
||||
if (amount <= 0)
|
||||
return;
|
||||
|
@@ -663,7 +663,6 @@ public partial class Gambling : GamblingModule<GamblingService>
|
||||
if (win > 0)
|
||||
{
|
||||
str = GetText(strs.br_win(N(win), result.Threshold + (result.Roll == 100 ? " 👑" : "")));
|
||||
await _cs.AddAsync(ctx.User, win, new("betroll", "win"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -142,7 +142,7 @@ public class GamblingService : INService, IReadyExecutor
|
||||
var onePercent = uow.DiscordUser.GetTopOnePercentCurrency(_client.CurrentUser.Id);
|
||||
decimal planted = uow.PlantedCurrency.AsQueryable().Sum(x => x.Amount);
|
||||
var waifus = uow.WaifuInfo.GetTotalValue();
|
||||
var bot = uow.DiscordUser.GetUserCurrency(_client.CurrentUser.Id);
|
||||
var bot = await uow.DiscordUser.GetUserCurrencyAsync(_client.CurrentUser.Id);
|
||||
decimal bank = await uow.GetTable<BankUser>()
|
||||
.SumAsyncLinqToDB(x => x.Balance);
|
||||
|
||||
|
Reference in New Issue
Block a user