Check if handleDiscordEvent raises an exception

This commit is contained in:
SeanOMik 2020-06-19 00:23:32 -05:00
parent 57c4a44fca
commit 65344ad26c
No known key found for this signature in database
GPG Key ID: FA4D55AC05268A88
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ proc handleWebsocketPacket(client: DiscordClient) {.async.} =
of ord(DiscordOpCode.opHeartbeatAck):
client.heartbeatAcked = true
of ord(DiscordOpCode.opDispatch):
discard handleDiscordEvent(client, json["d"], json["t"].getStr())
asyncCheck(handleDiscordEvent(client, json["d"], json["t"].getStr()))
else:
discard