Don't export Shard.reconnectShard

This commit is contained in:
SeanOMik 2020-08-28 16:07:57 -05:00
parent 6a31124ec5
commit 2ff89d9e18
No known key found for this signature in database
GPG Key ID: FA4D55AC05268A88
2 changed files with 1 additions and 6 deletions

View File

@ -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.

View File

@ -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