From e68ef63bc6ffb70eb4b43cfe9197e4ac20fac7b0 Mon Sep 17 00:00:00 2001 From: Christopher F Date: Mon, 12 Mar 2018 20:46:49 -0400 Subject: [PATCH] Allow GetPrefixedToken to handle the default TokenType This prevents an issue where no clients could be constructed. In 2fd4f56, the case for user tokens was removed from GetPrefixedToken, which means that the default value for TokenType would now fallthrough to the default case, which throws an error. --- src/Discord.Net.Rest/DiscordRestApiClient.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Discord.Net.Rest/DiscordRestApiClient.cs b/src/Discord.Net.Rest/DiscordRestApiClient.cs index c93ed628b..c2176ca60 100644 --- a/src/Discord.Net.Rest/DiscordRestApiClient.cs +++ b/src/Discord.Net.Rest/DiscordRestApiClient.cs @@ -69,6 +69,8 @@ namespace Discord.API { switch (tokenType) { + case default(TokenType): + return token; case TokenType.Bot: return $"Bot {token}"; case TokenType.Bearer: