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:
parent
e883e143eb
commit
9c080d9691
10 changed files with 144 additions and 31 deletions
|
@ -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)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue