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