Skip to content

Latest commit

 

History

History
68 lines (49 loc) · 2.97 KB

README.md

File metadata and controls

68 lines (49 loc) · 2.97 KB

Topgg Webhook with Rewards

This Bot is designed to reward users who vote for your bot on top.gg. By integrating the top.gg API and Discord.js library, It tracks user votes, sends a webhook notification, and grants a special role to the voter in your Discord server. The rewarded role is held for a specified duration, enhancing user engagement and appreciation.

Features:

  • Vote Tracking: MusicoBot monitors user votes on top.gg through a webhook, keeping track of each user's voting history.
  • Webhook Notifications: Receive real-time notifications on Discord when a user votes for your bot. The notifications include details such as the voter's username, vote count, and a customizable embed.
  • Role Rewards: Reward voters with a special Discord role, enhancing their status in the server. The role is automatically added upon voting and removed after a specified duration.
  • Persistent Data: Store and manage voting data in a JSON file, ensuring persistence across bot restarts.

Setup Guide

Prerequisites:

  1. Node.js: Ensure you have Node.js installed on your machine. You can download it from https://nodejs.org/.
  2. Discord Bot Token: Create a new Discord bot on the Discord Developer Portal and obtain the bot token.

Installation:

  1. Clone the repository:
  2. git clone https://github.com/PeTeR3431/Topgg-Webhook.git
  3. Navigate to the project directory:
  4. cd Topgg-Webhook
  5. Install dependencies:
  6. npm install
  7. Configure the bot:
  8. Create a config.json file in the project root and add the following:

    {
      "discordToken": "YOUR_DISCORD_BOT_TOKEN",
      "topggApiKey": "YOUR_TOPGG_API_KEY",
      "guildId": "YOUR_DISCORD_GUILD_ID",
      "webhookId": "YOUR_DISCORD_WEBHOOK_ID",
      "webhookToken": "YOUR_DISCORD_WEBHOOK_TOKEN"
    }

    Replace placeholders with your actual Discord bot token, top.gg API key, Discord guild ID, webhook ID, and webhook token.

  9. Run the bot:
  10. node index.js

Contributing

Contributions are welcome! If you find any issues, have suggestions, or want to add new features, feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.