From 057f7937fec0cb34255deb33363f376892041c34 Mon Sep 17 00:00:00 2001 From: Noi Date: Tue, 11 Aug 2020 18:22:41 -0700 Subject: [PATCH] Fix overly escaped data --- RegexBot/Module/AutoMod/Responses/Ban.cs | 3 +-- RegexBot/Module/AutoMod/Responses/Kick.cs | 3 +-- RegexBot/Module/ModCommands/Commands/BanKick.cs | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/RegexBot/Module/AutoMod/Responses/Ban.cs b/RegexBot/Module/AutoMod/Responses/Ban.cs index f3650d2..e49704d 100644 --- a/RegexBot/Module/AutoMod/Responses/Ban.cs +++ b/RegexBot/Module/AutoMod/Responses/Ban.cs @@ -43,8 +43,7 @@ namespace Noikoio.RegexBot.Module.AutoMod.Responses public override async Task Invoke(SocketMessage msg) { var target = (SocketGuildUser)msg.Author; - await target.Guild.AddBanAsync(target, _purgeDays, Uri.EscapeDataString($"Rule '{Rule.Label}'")); -#warning Remove EscapeDataString call on next Discord.Net update + await target.Guild.AddBanAsync(target, _purgeDays, $"Rule '{Rule.Label}'"); } } } diff --git a/RegexBot/Module/AutoMod/Responses/Kick.cs b/RegexBot/Module/AutoMod/Responses/Kick.cs index b9fe9f7..42149c1 100644 --- a/RegexBot/Module/AutoMod/Responses/Kick.cs +++ b/RegexBot/Module/AutoMod/Responses/Kick.cs @@ -21,8 +21,7 @@ namespace Noikoio.RegexBot.Module.AutoMod.Responses public override async Task Invoke(SocketMessage msg) { var target = (SocketGuildUser)msg.Author; - await target.KickAsync(Uri.EscapeDataString($"Rule '{Rule.Label}'")); -#warning Remove EscapeDataString call on next Discord.Net update + await target.KickAsync($"Rule '{Rule.Label}'"); } } } diff --git a/RegexBot/Module/ModCommands/Commands/BanKick.cs b/RegexBot/Module/ModCommands/Commands/BanKick.cs index b815067..ffa8c72 100644 --- a/RegexBot/Module/ModCommands/Commands/BanKick.cs +++ b/RegexBot/Module/ModCommands/Commands/BanKick.cs @@ -132,9 +132,7 @@ namespace Noikoio.RegexBot.Module.ModCommands.Commands { string reasonlog = $"Invoked by {msg.Author.ToString()}."; if (reason != null) reasonlog += $" Reason: {reason}"; - reasonlog = Uri.EscapeDataString(reasonlog); await notifyTask; -#warning Remove EscapeDataString call on next Discord.Net update #if !DEBUG if (_mode == CommandMode.Ban) await g.AddBanAsync(targetId, _purgeDays, reasonlog); else await targetobj.KickAsync(reasonlog);