Temporary workaround for https://github.com/DSharpPlus/DSharpPlus/issues/565
This commit is contained in:
@@ -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", "+");
|
||||
}
|
||||
}
|
||||
}
|
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user