Fix overly escaped data
This commit is contained in:
parent
a3988a22ed
commit
057f7937fe
3 changed files with 2 additions and 6 deletions
|
@ -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}'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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}'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue