Sign In

clientReady

This event is fired when the bot becomes ready

v1.0.1+

Register the event

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

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

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

Handle the event

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

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

Was this page helpful?