Add reconnect todo
This commit is contained in:
parent
eba9eeb741
commit
5b5b55735e
|
@ -48,6 +48,7 @@ proc handleHeartbeat(client: DiscordClient) {.async.} =
|
||||||
proc getIdentifyPacket(client: DiscordClient): JsonNode =
|
proc getIdentifyPacket(client: DiscordClient): JsonNode =
|
||||||
return %* { "op": ord(DiscordOpCode.opIdentify), "d": { "token": client.token, "properties": { "$os": system.hostOS, "$browser": "NimCord", "$device": "NimCord" } } }
|
return %* { "op": ord(DiscordOpCode.opIdentify), "d": { "token": client.token, "properties": { "$os": system.hostOS, "$browser": "NimCord", "$device": "NimCord" } } }
|
||||||
|
|
||||||
|
#TODO: Reconnecting. It should be pretty easy tbh.
|
||||||
proc handleWebsocketPacket(client: DiscordClient) {.async.} =
|
proc handleWebsocketPacket(client: DiscordClient) {.async.} =
|
||||||
while true:
|
while true:
|
||||||
var packet: tuple[opcode: Opcode, data: string]
|
var packet: tuple[opcode: Opcode, data: string]
|
||||||
|
|
Reference in New Issue