From 7a4629c783b35db43c6c7dfc10db0308d52e9e01 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Thu, 20 Oct 2016 04:19:01 +0200 Subject: [PATCH] v+t fixed? Currency transactions now hold negative values too. --- .../Modules/Administration/Commands/VoicePlusTextCommands.cs | 5 +++-- src/NadekoBot/Services/CurrencyHandler.cs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs b/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs index 0d0d7da3..64a5064c 100644 --- a/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs @@ -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; diff --git a/src/NadekoBot/Services/CurrencyHandler.cs b/src/NadekoBot/Services/CurrencyHandler.cs index 6b9f26f7..24324c77 100644 --- a/src/NadekoBot/Services/CurrencyHandler.cs +++ b/src/NadekoBot/Services/CurrencyHandler.cs @@ -38,7 +38,7 @@ namespace NadekoBot.Services { UserId = authorId, Reason = reason, - Amount = amount, + Amount = -amount, }); await uow.CompleteAsync().ConfigureAwait(false); }