fix(WebSocketManager): Correct error name (#8138)

This commit is contained in:
Jiralite
2022-06-21 13:35:17 +01:00
committed by GitHub
parent 94f7ca9474
commit db2b0333d9
2 changed files with 2 additions and 2 deletions

View File

@@ -130,7 +130,7 @@ class WebSocketManager extends EventEmitter {
* @private
*/
async connect() {
const invalidToken = new Error(ErrorCodes.AuthenticationFailed);
const invalidToken = new Error(ErrorCodes.TokenInvalid);
const {
url: gatewayURL,
shards: recommendedShards,

View File

@@ -160,7 +160,7 @@ const Messages = {
};
// Magic needed by WS
Messages.AuthenticationFailed = Messages[DjsErrorCodes.AuthenticationFailed];
Messages.AuthenticationFailed = Messages[DjsErrorCodes.TokenInvalid];
Messages.InvalidShard = Messages[DjsErrorCodes.ShardingInvalid];
Messages.ShardingRequired = Messages[DjsErrorCodes.ShardingRequired];
Messages.InvalidIntents = Messages[DjsErrorCodes.InvalidIntents];