mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 22:37:54 +00:00
remove some unused/legacy code
This commit is contained in:
parent
9fd4f327e0
commit
c27cbeed01
3 changed files with 3 additions and 14 deletions
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue