Socket
Book a DemoInstallSign in
Socket

@tryforge/forge.topgg

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tryforge/forge.topgg

Automatically post your bot stats and receive vote events from the site.

1.1.4
latest
npmnpm
Version published
Maintainers
2
Created
Source

ForgeTopGG

Automatically post your bot stats and receive vote events from the site.

To receive vote events, you must set your webhook url in the settings of your bot/server on Top.gg to the ip/domain of your bot host + the port it's listening to, which by default is 3000 and /dblwebhook at the end.

Example (JavaScript)

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

const top = new ForgeTopGG({
    token: "top.gg token",
    auth: "top.gg authorization value for webhooks",
    events: [
        "error",
        "posted",
        "voted"
    ],
    post: {
        interval: 3_600_000 // Update bot stats every hour
    }
})

const client = new ForgeClient({
    intents: [
        "Guilds",
        "MessageContent",
        "GuildMessages",
    ],
    events: [],
    mobile: true,
    useInviteSystem: true,
    prefixes: ["!", "<@$botID>"],
    extensions: [
        top
    ],
})

top.commands.add({
    type: "error",
    code: `$log[Error $postStatsError]`
})

top.commands.add({
    type: "posted",
    code: `$log[posted!]`
})

top.commands.add({
    type: "voted",
    code: `$log[voted by $voteUserID]`
})

client.login("bot token")

Keywords

topgg

FAQs

Package last updated on 31 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.