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);
enabled = false;
}
await uow.CompleteAsync();
}
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
{
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())
{
var success = uow.Currency.TryUpdateState(author.Id, amount);
var success = uow.Currency.TryUpdateState(author.Id, -amount);
if (!success)
return false;
await uow.CompleteAsync();