diff --git a/src/nimcord/client.nim b/src/nimcord/client.nim index ea1cf3e..e629ba2 100644 --- a/src/nimcord/client.nim +++ b/src/nimcord/client.nim @@ -110,7 +110,7 @@ proc handleWebsocketPacket(shard: Shard) {.async.} = while true: var packet: tuple[opcode: Opcode, data: string] - packet = await shard.ws.readData(); + packet = await shard.ws.readData() echo "[SHARD ", $shard.id, "] Received gateway payload: ", packet.data if packet.opcode == Opcode.Close: @@ -120,7 +120,7 @@ proc handleWebsocketPacket(shard: Shard) {.async.} = # If we fail to parse the json just stop this loop try: - json = parseJson(packet.data); + json = parseJson(packet.data) except: echo "Failed to parse websocket payload: ", packet.data continue diff --git a/src/nimcord/log.nim b/src/nimcord/log.nim index b3893e4..3bac7ee 100644 --- a/src/nimcord/log.nim +++ b/src/nimcord/log.nim @@ -40,13 +40,13 @@ proc canLog(log: Log, sev: LogSeverity): bool = case sev of LogSeverity.logSevInfo: - return (log.flags and int(LoggerFlags.loggerFlagInfoSeverity)) == int(LoggerFlags.loggerFlagInfoSeverity); + return (log.flags and int(LoggerFlags.loggerFlagInfoSeverity)) == int(LoggerFlags.loggerFlagInfoSeverity) of LogSeverity.logSevWarn: - return (log.flags and int(LoggerFlags.loggerFlagWarnSeverity)) == int(LoggerFlags.loggerFlagWarnSeverity); + return (log.flags and int(LoggerFlags.loggerFlagWarnSeverity)) == int(LoggerFlags.loggerFlagWarnSeverity) of LogSeverity.logSevError: - return (log.flags and int(LoggerFlags.loggerFlagErrorSeverity)) == int(LoggerFlags.loggerFlagErrorSeverity); + return (log.flags and int(LoggerFlags.loggerFlagErrorSeverity)) == int(LoggerFlags.loggerFlagErrorSeverity) else: - return false; + return false proc severityToString(sev: LogSeverity): string = case sev