Sign In

variableDelete

This event is triggered when a variable gets deleted.

v2.0.0+

Register the event

Enable variableDelete in events in your ForgeDB options in index.js:

const { ForgeClient } = require("@tryforge/forgescript")
const { ForgeDB } = require("@tryforge/forge.db")

const db = new ForgeDB({
  events: [
    "variableDelete"
  ]
})

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

Handle the event

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

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

Was this page helpful?