discordnim
discordnim copied to clipboard
Exception: Incorrect JSON kind
Running the basic bot example, I get the following crash after a short time:
basic_bot.nim(19) basic_bot
asyncdispatch.nim(1656) waitFor
asyncdispatch.nim(1516) poll
asyncdispatch.nim(1282) runOnce
asyncdispatch.nim(191) processPendingCallbacks
asyncmacro.nim(36) sessionHandleSocketMessage_continue
discord.nim(354) sessionHandleSocketMessageIter
asyncmacro.nim(313) handleDispatch
asyncmacro.nim(36) handleDispatch_continue
discord.nim(252) handleDispatchIter
json.nim(944) newPresenceUpdate
[[reraised from:
basic_bot.nim(19) basic_bot
asyncdispatch.nim(1656) waitFor
asyncdispatch.nim(1516) poll
asyncdispatch.nim(1282) runOnce
asyncdispatch.nim(191) processPendingCallbacks
asyncfutures.nim(349) :anonymous
]]
Error: unhandled exception: Incorrect JSON kind. Wanted '{JObject}' in 'temp608520["game"]' but got 'JNull'.
Async traceback:
basic_bot.nim(19) basic_bot
asyncdispatch.nim(1656) waitFor
asyncdispatch.nim(1516) poll
## Processes asynchronous completion events
asyncdispatch.nim(1282) runOnce
asyncdispatch.nim(191) processPendingCallbacks
## Executes pending callbacks
asyncmacro.nim(36) sessionHandleSocketMessage_continue
## Resumes an async procedure
discord.nim(354) sessionHandleSocketMessageIter
asyncmacro.nim(313) handleDispatch
asyncmacro.nim(36) handleDispatch_continue
## Resumes an async procedure
discord.nim(252) handleDispatchIter
json.nim(944) newPresenceUpdate
Exception message: Incorrect JSON kind. Wanted '{JObject}' in 'temp608520["game"]' but got 'JNull'.
Exception type: [JsonKindError]