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