This commit is contained in:
Ske
2020-05-05 19:09:18 +02:00
parent c1d17c2944
commit 892601110f
4 changed files with 21 additions and 4 deletions

View File

@@ -84,5 +84,11 @@ namespace PluralKit.Bot
await msg.CreateReactionAsync(DiscordEmoji.FromUnicode(reaction));
}
}
public static string WorkaroundForUrlBug(string input)
{
// Workaround for https://github.com/DSharpPlus/DSharpPlus/issues/565
return input.Replace("%20", "+");
}
}
}

View File

@@ -3,6 +3,8 @@ using System.Linq;
using System.Net.Sockets;
using System.Threading.Tasks;
using DSharpPlus.Exceptions;
using Npgsql;
using PluralKit.Core;
@@ -40,5 +42,10 @@ namespace PluralKit.Bot
// This may expanded at some point.
return true;
}
public static string ExtractError(BadRequestException e)
{
return e.WebResponse.Response;
}
}
}