Sign In

linkedNodeConnect

Triggered when connects to a node

v2.1.3+

Register the event

Enable linkedNodeConnect in events in your ForgeLinked options in index.js:

const { ForgeClient } = require("@tryforge/forgescript")
const { ForgeLinked } = require("@tryforge/forge.linked")

const linked = new ForgeLinked({
  events: [
    "linkedNodeConnect"
  ]
})

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

Handle the event

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

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

Was this page helpful?