From b5fa858cbff30544ef078ce25f40d8aba63f76d2 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 15 Nov 2016 01:06:07 +0100 Subject: [PATCH] Fixed bet saying you won 0 if there weren't enough participants --- src/NadekoBot/Modules/Gambling/Commands/AnimalRacing.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/Gambling/Commands/AnimalRacing.cs b/src/NadekoBot/Modules/Gambling/Commands/AnimalRacing.cs index 5faf6108..e52b1158 100644 --- a/src/NadekoBot/Modules/Gambling/Commands/AnimalRacing.cs +++ b/src/NadekoBot/Modules/Gambling/Commands/AnimalRacing.cs @@ -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); } var p = participants.FirstOrDefault(); - if (p != null) - await CurrencyHandler.AddCurrencyAsync(p.User, "BetRace", p.AmountBet, true).ConfigureAwait(false); + if (p != null && p.AmountBet > 0) + await CurrencyHandler.AddCurrencyAsync(p.User, "BetRace", p.AmountBet, false).ConfigureAwait(false); End(); return; }