Fixed flower removal, message in gc

This commit is contained in:
Kwoth 2016-09-08 22:57:03 +02:00
parent 4fd017f651
commit a9cf124bca
2 changed files with 4 additions and 4 deletions

View File

@ -190,15 +190,15 @@ namespace NadekoBot.Modules.Games
generationChannels.TryRemove(channel.Id, out throwaway); generationChannels.TryRemove(channel.Id, out throwaway);
enabled = false; enabled = false;
} }
await uow.CompleteAsync();
} }
if (enabled) if (enabled)
{ {
await channel.SendMessageAsync("`Currency generation disabled on this channel.`").ConfigureAwait(false); await channel.SendMessageAsync("`Currency generation enabled on this channel.`").ConfigureAwait(false);
} }
else else
{ {
await channel.SendMessageAsync($"`Currency generation enabled on this channel.`").ConfigureAwait(false); await channel.SendMessageAsync($"`Currency generation disabled on this channel.`").ConfigureAwait(false);
} }
} }

View File

@ -20,7 +20,7 @@ namespace NadekoBot.Services
using (var uow = DbHandler.UnitOfWork()) using (var uow = DbHandler.UnitOfWork())
{ {
var success = uow.Currency.TryUpdateState(author.Id, amount); var success = uow.Currency.TryUpdateState(author.Id, -amount);
if (!success) if (!success)
return false; return false;
await uow.CompleteAsync(); await uow.CompleteAsync();