From 0339c0e4aa439addce8ab6e048d3e1281e3966d5 Mon Sep 17 00:00:00 2001 From: Christopher F Date: Thu, 8 Sep 2016 18:43:48 -0400 Subject: [PATCH] Prefix tokens being sent to Gateway As of 2016/09/08, Discord started enforcing the requirement for tokens to be prefixed with the account type. While REST requests were already prefixed tokens, Gateway connections did not use a prefixed token. This fixes a fatal bug where no bot clients can create connections to Discord. --- src/Discord.Net/API/DiscordSocketApiClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Discord.Net/API/DiscordSocketApiClient.cs b/src/Discord.Net/API/DiscordSocketApiClient.cs index 2d2579273..f7a3418e8 100644 --- a/src/Discord.Net/API/DiscordSocketApiClient.cs +++ b/src/Discord.Net/API/DiscordSocketApiClient.cs @@ -191,7 +191,7 @@ namespace Discord.API }; var msg = new IdentifyParams() { - Token = _authToken, + Token = GetPrefixedToken(AuthTokenType, _authToken), Properties = props, LargeThreshold = largeThreshold, UseCompression = useCompression,