Don't export Shard.reconnectShard
This commit is contained in:
parent
6a31124ec5
commit
2ff89d9e18
|
@ -90,11 +90,6 @@ registerCommand(Command(name: "ping2", commandBody: proc(ctx: CommandContext) =
|
||||||
asyncCheck ctx.channel.sendMessage("PONG 2")
|
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.
|
# Listen for the ready event.
|
||||||
registerEventListener(EventType.evtReady, proc(bEvt: BaseEvent) =
|
registerEventListener(EventType.evtReady, proc(bEvt: BaseEvent) =
|
||||||
# Cast the BaseEvent to the ReadyEvent which is what we're listening to.
|
# Cast the BaseEvent to the ReadyEvent which is what we're listening to.
|
||||||
|
|
|
@ -73,7 +73,7 @@ proc closeConnection*(shard: Shard, code: int = 1000) {.async.} =
|
||||||
shard.client.log.warn("[SHARD " & $shard.id & "] Disconnecting with code: " & $code)
|
shard.client.log.warn("[SHARD " & $shard.id & "] Disconnecting with code: " & $code)
|
||||||
await shard.ws.close(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.client.log.info("[SHARD " & $shard.id & "] Reconnecting...")
|
||||||
shard.reconnecting = true
|
shard.reconnecting = true
|
||||||
|
|
||||||
|
|
Reference in New Issue