You can now specify 'allin' instead of the amount when playing .wheel, .br and .bf
This commit is contained in:
@ -20,14 +20,16 @@ namespace NadekoBot.Modules.Gambling
|
||||
private readonly IImageCache _images;
|
||||
private readonly IBotConfigProvider _bc;
|
||||
private readonly CurrencyService _cs;
|
||||
|
||||
private readonly DbService _db;
|
||||
private static readonly NadekoRandom rng = new NadekoRandom();
|
||||
|
||||
public FlipCoinCommands(IDataCache data, CurrencyService cs, IBotConfigProvider bc)
|
||||
public FlipCoinCommands(IDataCache data, CurrencyService cs,
|
||||
IBotConfigProvider bc, DbService db)
|
||||
{
|
||||
_images = data.LocalImages;
|
||||
_bc = bc;
|
||||
_cs = cs;
|
||||
_db = db;
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -86,7 +88,18 @@ namespace NadekoBot.Modules.Gambling
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
public async Task Betflip(int amount, BetFlipGuess guess)
|
||||
public Task Betflip(Allin _, BetFlipGuess guess)
|
||||
{
|
||||
long cur;
|
||||
using (var uow = _db.UnitOfWork)
|
||||
{
|
||||
cur = uow.Currency.GetUserCurrency(Context.User.Id);
|
||||
}
|
||||
return Betflip(cur, guess);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
public async Task Betflip(long amount, BetFlipGuess guess)
|
||||
{
|
||||
if (amount < _bc.BotConfig.MinimumBetAmount)
|
||||
{
|
||||
|
Reference in New Issue
Block a user