1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-04-29 02:29:55 +03:00

Add support for temporary bans

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
Octol1ttle 2023-06-11 16:57:19 +05:00
parent e883e143eb
commit 9c080d9691
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
10 changed files with 144 additions and 31 deletions

View file

@ -1,3 +1,4 @@
using System.Net;
using System.Text;
using DiffPlex.DiffBuilder.Model;
using Remora.Discord.API;
@ -108,6 +109,10 @@ public static class Extensions {
return Messages.ResourceManager.GetString(key, Messages.Culture) ?? key;
}
public static string EncodeHeader(this string s) {
return WebUtility.UrlEncode(s).Replace('+', ' ');
}
public static string AsMarkdown(this SideBySideDiffModel model) {
var builder = new StringBuilder();
foreach (var line in model.OldText.Lines.Where(piece => !string.IsNullOrWhiteSpace(piece.Text)))