Sign In

linkedPlayerVoiceJoin

This event is called when a user joins the player voice channel while there is a player

v2.0.0+

Register the event

Enable linkedPlayerVoiceJoin 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: [
    "linkedPlayerVoiceJoin"
  ]
})

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

Handle the event

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

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

Was this page helpful?