Check if handleDiscordEvent raises an exception
This commit is contained in:
parent
57c4a44fca
commit
65344ad26c
|
@ -70,7 +70,7 @@ proc handleWebsocketPacket(client: DiscordClient) {.async.} =
|
||||||
of ord(DiscordOpCode.opHeartbeatAck):
|
of ord(DiscordOpCode.opHeartbeatAck):
|
||||||
client.heartbeatAcked = true
|
client.heartbeatAcked = true
|
||||||
of ord(DiscordOpCode.opDispatch):
|
of ord(DiscordOpCode.opDispatch):
|
||||||
discard handleDiscordEvent(client, json["d"], json["t"].getStr())
|
asyncCheck(handleDiscordEvent(client, json["d"], json["t"].getStr()))
|
||||||
else:
|
else:
|
||||||
discard
|
discard
|
||||||
|
|
||||||
|
|
Reference in New Issue