Add reconnect todo

This commit is contained in:
SeanOMik 2020-06-20 14:29:45 -05:00
parent eba9eeb741
commit 5b5b55735e
No known key found for this signature in database
GPG Key ID: FA4D55AC05268A88
1 changed files with 1 additions and 0 deletions

View File

@ -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]