From 4235b897f13d6aa6c5e066eb60dfb25369d7953f Mon Sep 17 00:00:00 2001 From: Kwoth Date: Thu, 13 Oct 2016 10:00:46 +0200 Subject: [PATCH] Fixed moneh abuse --- src/NadekoBot/Modules/Gambling/Commands/AnimalRacing.cs | 5 ++++- src/NadekoBot/Modules/Gambling/Commands/FlipCoinCommand.cs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/Gambling/Commands/AnimalRacing.cs b/src/NadekoBot/Modules/Gambling/Commands/AnimalRacing.cs index 649fe8fa..bf29c2bf 100644 --- a/src/NadekoBot/Modules/Gambling/Commands/AnimalRacing.cs +++ b/src/NadekoBot/Modules/Gambling/Commands/AnimalRacing.cs @@ -47,8 +47,11 @@ namespace NadekoBot.Modules.Gambling amount = 0; if (amount > 0) - if(!await CurrencyHandler.RemoveCurrencyAsync((IGuildUser)umsg.Author, "BetRace", amount, true).ConfigureAwait(false)) + if (!await CurrencyHandler.RemoveCurrencyAsync((IGuildUser)umsg.Author, "BetRace", amount, true).ConfigureAwait(false)) + { try { await channel.SendMessageAsync($"{umsg.Author.Mention} You don't have enough {Gambling.CurrencyName}s.").ConfigureAwait(false); } catch { } + return; + } AnimalRace ar; diff --git a/src/NadekoBot/Modules/Gambling/Commands/FlipCoinCommand.cs b/src/NadekoBot/Modules/Gambling/Commands/FlipCoinCommand.cs index 5fb0ddf4..2383d5b9 100644 --- a/src/NadekoBot/Modules/Gambling/Commands/FlipCoinCommand.cs +++ b/src/NadekoBot/Modules/Gambling/Commands/FlipCoinCommand.cs @@ -59,7 +59,7 @@ namespace NadekoBot.Modules.Gambling if (amount < 1) return; - + // todo update this long userFlowers; using (var uow = DbHandler.UnitOfWork()) {