Sign In

voted

This event is called when someone votes for your Top.gg bot

v1.0.0+

Register the event

Enable voted in events in your ForgeTopGG options in index.js:

const { ForgeClient } = require("@tryforge/forgescript")
const { ForgeTopGG } = require("@tryforge/forge.topgg")

const topgg = new ForgeTopGG({
  events: [
    "voted"
  ]
})

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

Handle the event

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

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

Was this page helpful?