Register the event
Enable interactionCreate in events in your ForgeClient options in index.js:
const { ForgeClient } = require("@tryforge/forgescript")
const client = new ForgeClient({
events: [
"interactionCreate"
],
intents: [
"Guilds"
]
})Handle the event
Listen and react when interactionCreate is triggered using an inline command or an external handler file:
client.commands.add({
type: "interactionCreate",
code: `$log[interactionCreate event was triggered!]`
})