From d332535ab133213bf5c921a5d14e09cd31d2c66c Mon Sep 17 00:00:00 2001 From: spiral Date: Sat, 24 Dec 2022 22:37:04 +0000 Subject: [PATCH] Revert "fix(bot): wait for identify limit on identify instead of shard connect" This reverts commit 6277d72c9c1de65253f1e6459424158e9c99810c. --- Myriad/Gateway/Shard.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Myriad/Gateway/Shard.cs b/Myriad/Gateway/Shard.cs index 71fbde73..ed7a3005 100644 --- a/Myriad/Gateway/Shard.cs +++ b/Myriad/Gateway/Shard.cs @@ -132,6 +132,8 @@ public class Shard { while (true) { + await _ratelimiter.Identify(_info.ShardId); + _logger.Information("Shard {ShardId}: Connecting to WebSocket", _info.ShardId); try { @@ -150,10 +152,7 @@ public class Shard => _conn.Disconnect(closeStatus, null); private async Task SendIdentify() - { - await _ratelimiter.Identify(_info.ShardId); - - await _conn.Send(new GatewayPacket + => await _conn.Send(new GatewayPacket { Opcode = GatewayOpcode.Identify, Payload = new GatewayIdentify @@ -172,7 +171,6 @@ public class Shard Presence = _presence, } }); - } private async Task SendResume((string SessionId, int? LastSeq) arg) => await _conn.Send(new GatewayPacket