diff --git a/litecord/gateway/websocket.py b/litecord/gateway/websocket.py index de1489f..9b96513 100644 --- a/litecord/gateway/websocket.py +++ b/litecord/gateway/websocket.py @@ -397,6 +397,12 @@ class GatewayWebsocket: such as READY and RESUMED, or events that are replies to messages in the websocket. """ + if not self.state: + log.warning( + "can not dispatch {!r} as there is no state in ws {!r}", event, self + ) + return + payload = { "op": OP.DISPATCH, "t": event.upper(),