Fixed bet saying you won 0 if there weren't enough participants

This commit is contained in:
Kwoth 2016-11-15 01:06:07 +01:00
parent e76ec464d3
commit b5fa858cbf

View File

@ -112,8 +112,8 @@ namespace NadekoBot.Modules.Gambling
try { await raceChannel.SendMessageAsync("🏁`Race failed to start since there was not enough participants.`"); } catch (Exception ex) { _log.Warn(ex); } try { await raceChannel.SendMessageAsync("🏁`Race failed to start since there was not enough participants.`"); } catch (Exception ex) { _log.Warn(ex); }
var p = participants.FirstOrDefault(); var p = participants.FirstOrDefault();
if (p != null) if (p != null && p.AmountBet > 0)
await CurrencyHandler.AddCurrencyAsync(p.User, "BetRace", p.AmountBet, true).ConfigureAwait(false); await CurrencyHandler.AddCurrencyAsync(p.User, "BetRace", p.AmountBet, false).ConfigureAwait(false);
End(); End();
return; return;
} }