Sign In

audioTracksAdd

Executed when multiple audio track are added to the queue.

v1.0.0+

Register the event

Enable audioTracksAdd in events in your ForgeMusic options in index.js (and include the required gateway intents in your ForgeClient options):

const { ForgeClient } = require("@tryforge/forgescript")
const { ForgeMusic } = require("@tryforge/forge.music")

const music = new ForgeMusic({
  events: [
    "audioTracksAdd"
  ]
})

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

Handle the event

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

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

Required Intents

Listening to this event requires:

Was this page helpful?