remove some unused/legacy code

This commit is contained in:
spiral
2021-08-04 01:39:41 -04:00
parent 9fd4f327e0
commit c27cbeed01
3 changed files with 3 additions and 14 deletions

View File

@@ -56,12 +56,6 @@ namespace PluralKit.Bot
}
}
public static string WorkaroundForUrlBug(string input)
{
// Workaround for https://github.com/DSharpPlus/DSharpPlus/issues/565
return input?.Replace("%20", "+");
}
public static uint? ToDiscordColor(this string color)
{
if (uint.TryParse(color, NumberStyles.HexNumber, null, out var colorInt))

View File

@@ -55,11 +55,6 @@ namespace PluralKit.Bot
{
// This function filters out sporadic errors out of our control from being reported to Sentry
// otherwise we'd blow out our error reporting budget as soon as Discord takes a dump, or something.
// Discord server errors are *not our problem*
// TODO: DSharpPlus doesn't have a generic "HttpException" type and only special cases a couple response codes (that we don't need here)
// Doesn't seem to handle 500s in the library at all, I'm not sure what it does in case it receives one...
// if (e is DSharpPlus.Exceptions he && ((int) he.HttpCode) >= 500) return false;
// Occasionally Discord's API will Have A Bad Time and return a bunch of CloudFlare errors (in HTML format).
// The library tries to parse these HTML responses as JSON and crashes with a consistent exception message.