Fixed flower removal, message in gc
This commit is contained in:
parent
4fd017f651
commit
a9cf124bca
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user