npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

top.gg-voter

v0.0.5

Published

An auto voter client that automatically votes for a bot on Top.gg using Discord tokens

Readme

top.gg-voter

An automated voting client for top.gg bot listings with support for multiple Discord tokens, proxy rotation, and customizable voting cycles.

[!WARNING] I don't take any responsibility for blocked Discord accounts that used this module.

[!CAUTION] Using this on a user account is prohibited by the Discord TOS and can lead to the account block.

Features

  • 🤖 Automated Voting: Continuously vote for your bot on top.gg
  • 🔄 Multiple Token Support: Use multiple Discord tokens for increased voting power
  • 🌐 Proxy Support: Rotate through multiple proxies to avoid rate limiting
  • Parallel/Sequential Execution: Choose between parallel or sequential token processing
  • 🕒 Customizable Cooldowns: Set custom intervals between voting cycles
  • 📊 Built-in Statistics: Track successful, failed, and invalid votes
  • 🛡️ Error Handling: Comprehensive error handling with custom error logging
  • 🔍 Verbose Logging: Detailed logging for debugging and monitoring
  • Token Validation: Automatic Discord token validation before voting
  • 🎯 Turnstile Support: Built-in Cloudflare Turnstile bypass

Requirements

  • Node.js: 18.0.0 or higher (20.x recommended)
  • Dependencies: puppeteer-real-browser

Installation

npm install top.gg-voter

Quick Start

const { AutoClient } = require('top.gg-voter');

const client = new AutoClient({
  tokenList: ['YOUR_DISCORD_TOKEN_1', 'YOUR_DISCORD_TOKEN_2'],
  botId: 'YOUR_BOT_ID',
  verbose: true
});

client.autovoteBot();

Get Token ?

Run code (Discord Console - [Ctrl + Shift + I])

window.webpackChunkdiscord_app.push([
  [Math.random()],
  {},
  req => {
    if (!req.c) return;
    for (const m of Object.keys(req.c)
      .map(x => req.c[x].exports)
      .filter(x => x)) {
      if (m.default && m.default.getToken !== undefined) {
        return copy(m.default.getToken());
      }
      if (m.getToken !== undefined) {
        return copy(m.getToken());
      }
    }
  },
]);
window.webpackChunkdiscord_app.pop();
console.log('%cWorked!', 'font-size: 50px');
console.log(`%cYou now have your token in the clipboard!`, 'font-size: 16px');

API Reference

AutoClient

Constructor Options

new AutoClient({
  tokenList,      // string[] - Array of Discord tokens (required)
  botId,          // string - Your bot's top.gg ID (required)
  cooldown,       // number - ms between cycles (default: 12 hours)
  runInParallel,  // boolean - Process tokens simultaneously (default: false)
  proxies,        // string[] - Proxy URLs (optional)
  fetchFn,        // Function - Custom fetch function (default: global.fetch)
  verbose,        // boolean - Enable detailed logging (default: false)
  errorLog        // Function - Custom error handler (default: throws)
})

Methods

  • autovoteBot() - Start the continuous voting loop
  • _log(message) - Internal logging method
  • _handleError(error) - Internal error handling

Examples

Basic Usage

const { AutoClient } = require('top.gg-voter');

const client = new AutoClient({
  tokenList: [
    'YOUR_DISCORD_TOKEN'
  ],
  botId: 'YOUR_BOT_ID',
  verbose: true
});

client.autovoteBot();

Advanced Configuration

const { AutoClient } = require('top.gg-voter');

const client = new AutoClient({
  tokenList: [
    'TOKEN_1',
    'TOKEN_2',
    'TOKEN_3'
  ],
  botId: 'YOUR_BOT_ID',
  cooldown: 6 * 60 * 60 * 1000,  // 6 hours
  runInParallel: true,            // Vote with all tokens simultaneously
  proxies: [
    'http://user:[email protected]:8080',
    'http://user:[email protected]:8080',
    'socks5://user:[email protected]:1080'
  ],
  verbose: true,
  errorLog: (error) => {
    console.error(`[${new Date().toISOString()}] ERROR:`, error.message);
    // Send to your logging service
  }
});

client.autovoteBot().catch(console.error);

Functional Approach

const { autovoteBot } = require('top.gg-voter');

autovoteBot({
  tokenList: ['YOUR_TOKEN'],
  botId: 'YOUR_BOT_ID',
  cooldown: 12 * 60 * 60 * 1000,  // 12 hours
  verbose: true
});

Error Handling

const { AutoClient } = require('top.gg-voter');

const client = new AutoClient({
  tokenList: ['YOUR_TOKEN'],
  botId: 'YOUR_BOT_ID',
  verbose: true,
  errorLog: (error) => {
    if (error.message.includes('Invalid token')) {
      console.log('Token expired, removing from rotation...');
      // Handle token removal logic
    } else if (error.message.includes('Vote')) {
      console.log('Vote failed, will retry next cycle');
    } else {
      console.error('Unexpected error:', error);
    }
  }
});

// Global error handlers
process.on('unhandledRejection', (reason, promise) => {
  console.error('Unhandled Rejection:', reason);
});

process.on('uncaughtException', (error) => {
  console.error('Uncaught Exception:', error);
  process.exit(1);
});

client.autovoteBot();

Configuration Options

Proxy Format

Supported proxy formats:

  • HTTP: http://username:password@host:port
  • HTTPS: https://username:password@host:port
  • SOCKS5: socks5://username:password@host:port

Cooldown Settings

Common cooldown configurations:

  • 12 hours: 12 * 60 * 60 * 1000 (default)
  • 6 hours: 6 * 60 * 60 * 1000
  • 24 hours: 24 * 60 * 60 * 1000

Token Management

  • Tokens are automatically validated before each vote attempt
  • Invalid tokens are logged and skipped
  • Tokens should have the bot scope for Discord applications

Statistics

The client tracks voting statistics:

client.stats = {
  total: 3,      // Total number of tokens
  success: 2,    // Successful votes this cycle
  failed: 1,     // Failed vote attempts
  invalid: 0     // Invalid/expired tokens
}

Troubleshooting

Common Issues

  1. Browser not opening: Ensure you have sufficient system resources and Chrome/Chromium installed
  2. Token validation fails: Check token format and permissions
  3. Proxy connection errors: Verify proxy credentials and connectivity
  4. Rate limiting: Increase cooldown time or use more proxies

Debug Mode

Enable verbose logging for detailed information:

const client = new AutoClient({
  // ... other options
  verbose: true
});

Performance Tips

  • Use runInParallel: false for better stability with many tokens
  • Implement proxy rotation for high-volume voting
  • Monitor system resources when using multiple browser instances
  • Use appropriate cooldown times to avoid rate limiting

License

MIT

Contributing

Contributions are welcome! Please read the contributing guidelines before submitting PRs.

Disclaimer

This tool is for educational purposes only. Users are responsible for complying with Discord's Terms of Service and top.gg's policies. The authors assume no liability for account suspensions or other consequences resulting from the use of this software.