v+t fixed? Currency transactions now hold negative values too.

This commit is contained in:
Kwoth 2016-10-20 04:19:01 +02:00
parent 35e59c8c58
commit 7a4629c783
2 changed files with 4 additions and 3 deletions

View File

@ -102,7 +102,7 @@ namespace NadekoBot.Modules.Administration
[RequireContext(ContextType.Guild)]
[RequirePermission(GuildPermission.ManageRoles)]
[RequirePermission(GuildPermission.ManageChannels)]
public async Task VoicePlusText(IUserMessage msg, [Remainder] string arg)
public async Task VoicePlusText(IUserMessage msg)
{
var channel = (ITextChannel)msg.Channel;
var guild = channel.Guild;
@ -120,6 +120,7 @@ namespace NadekoBot.Modules.Administration
{
var conf = uow.GuildConfigs.For(guild.Id);
isEnabled = conf.VoicePlusTextEnabled = !conf.VoicePlusTextEnabled;
await uow.CompleteAsync().ConfigureAwait(false);
}
voicePlusTextCache.AddOrUpdate(guild.Id, isEnabled, (id, val) => isEnabled);
if (isEnabled)
@ -143,7 +144,7 @@ namespace NadekoBot.Modules.Administration
[RequireContext(ContextType.Guild)]
[RequirePermission(GuildPermission.ManageChannels)]
[RequirePermission(GuildPermission.ManageRoles)]
public async Task CleanVPlusT(IUserMessage msg, [Remainder] string arg)
public async Task CleanVPlusT(IUserMessage msg)
{
var channel = (ITextChannel)msg.Channel;
var guild = channel.Guild;

View File

@ -38,7 +38,7 @@ namespace NadekoBot.Services
{
UserId = authorId,
Reason = reason,
Amount = amount,
Amount = -amount,
});
await uow.CompleteAsync().ConfigureAwait(false);
}