Sign In

shardDisconnect

This event is fired when a shard is disconnected

v1.0.1+

Register the event

Enable shardDisconnect in events in your ForgeClient options in index.js:

const { ForgeClient } = require("@tryforge/forgescript")

const client = new ForgeClient({
  events: [
    "shardDisconnect"
  ],
  intents: [
    "Guilds"
  ]
})

Handle the event

Listen and react when shardDisconnect is triggered using an inline command or an external handler file:

client.commands.add({
  type: "shardDisconnect",
  code: `$log[shardDisconnect event was triggered!]`
})

Was this page helpful?