2021-04-04 05:42:15 +00:00
|
|
|
import type { Gateway, GatewayEventHandler } from '../mod.ts'
|
2020-12-02 12:29:52 +00:00
|
|
|
|
|
|
|
export const reconnect: GatewayEventHandler = async (
|
|
|
|
gateway: Gateway,
|
|
|
|
d: any
|
|
|
|
) => {
|
2021-01-25 11:34:43 +00:00
|
|
|
gateway.client.emit('reconnect', gateway.shards?.[0] ?? 0)
|
2020-12-02 12:29:52 +00:00
|
|
|
gateway.reconnect()
|
|
|
|
}
|