From 2ff89d9e189f4a6d2578adcb862bbd8d6924041a Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Fri, 28 Aug 2020 16:07:57 -0500 Subject: [PATCH] Don't export Shard.reconnectShard --- examples/basic.nim | 5 ----- src/nimcord/client.nim | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/examples/basic.nim b/examples/basic.nim index eb80492..be182d8 100644 --- a/examples/basic.nim +++ b/examples/basic.nim @@ -90,11 +90,6 @@ registerCommand(Command(name: "ping2", commandBody: proc(ctx: CommandContext) = asyncCheck ctx.channel.sendMessage("PONG 2") )) -registerCommand(Command(name: "reconnect", commandBody: proc(ctx: CommandContext) = - asyncCheck ctx.channel.sendMessage("Reconnecting...") - asyncCheck ctx.client.shards[0].reconnectShard() -)) - # Listen for the ready event. registerEventListener(EventType.evtReady, proc(bEvt: BaseEvent) = # Cast the BaseEvent to the ReadyEvent which is what we're listening to. diff --git a/src/nimcord/client.nim b/src/nimcord/client.nim index 161209d..ecd97c4 100644 --- a/src/nimcord/client.nim +++ b/src/nimcord/client.nim @@ -73,7 +73,7 @@ proc closeConnection*(shard: Shard, code: int = 1000) {.async.} = shard.client.log.warn("[SHARD " & $shard.id & "] Disconnecting with code: " & $code) await shard.ws.close(code) -proc reconnectShard*(shard: Shard) {.async.} = +proc reconnectShard(shard: Shard) {.async.} = shard.client.log.info("[SHARD " & $shard.id & "] Reconnecting...") shard.reconnecting = true