If discord error code is 0, fall back to http code
This commit is contained in:
@@ -20,7 +20,7 @@ namespace Discord.Net
|
|||||||
private static string CreateMessage(HttpStatusCode httpCode, int? discordCode = null, string reason = null)
|
private static string CreateMessage(HttpStatusCode httpCode, int? discordCode = null, string reason = null)
|
||||||
{
|
{
|
||||||
string msg;
|
string msg;
|
||||||
if (discordCode != null)
|
if (discordCode != null && discordCode != 0)
|
||||||
{
|
{
|
||||||
if (reason != null)
|
if (reason != null)
|
||||||
msg = $"The server responded with error {(int)discordCode}: {reason}";
|
msg = $"The server responded with error {(int)discordCode}: {reason}";
|
||||||
|
|||||||
Reference in New Issue
Block a user