Discord Role Giver Bot

By (@seagcz) · · Social Media Bots

I just vibe-coded my own Discord Role Giver bot 🤖⚡Started with a simple idea: users react to a specific Discord message and automatically receive a role. Then I kept building. Now it has slash commands, persistent configuration, automatic role handling, reaction tracking, SQLite storage, and a Discord-based setup flow. Admins can configure the role and target message directly from Discord without editing code every time. Built the whole thing through AI-assisted coding, testing everything in Termux, fixing permissions, debugging issues, and iterating until it worked. This is why I love vibe coding. Start with an idea, prompt it, test it, break it, fix it, ship it. 🚀 Another build shipped. Guys join my server and test it. Need honest feed backs

Tech stack

  • ChatGPT
  • Claude
  • GitHub Copilot

Prompt steps

  1. Step 1

    Create a simple script that can add or remove a Discord role from users who reacted to a specific message or voted on a poll message.
    ‎
    ‎The script will be run locally and should not operate as a continuously running Discord bot.
    ‎
    ‎Requirements
    ‎
    ‎The script should accept/configure:
    ‎
    ‎* Discord Server ID
    ‎* Discord Message ID
    ‎* Discord Role ID
    ‎* Action: ADD or REMOVE
    ‎
    ‎When executed:
    ‎
    ‎ADD
    ‎
    ‎* Find users who reacted to the specified Discord message
    ‎* Add the specified role to those users
    ‎
    ‎REMOVE
    ‎
    ‎* Find users who reacted to the specified Discord message
    ‎* Remove the specified role from those users
    ‎
    ‎Additional requirements:
    ‎
    ‎* Run locally from the command line
    ‎* Provide clear setup instructions
    ‎* Use environment variables for Discord credentials/tokens
    ‎* Log which users had the role added or removed
    ‎* Handle users who already have/don’t have the role without crashing
    ‎* Include the complete source code and README
    ‎
  2. Step 2

    Upgrade my existing Discord role-sync project into a proper always-online Discord bot without breaking the currently working role synchronization system.
    ‎
    ‎First inspect the entire existing project and understand the current architecture before changing anything. Preserve the existing .env configuration and never expose or hardcode the Discord bot token.
    ‎
    ‎The bot currently connects to Discord, reads a configured message, detects emoji reactions and native Discord poll voters, and can add/remove a configured role. Preserve this functionality.
    ‎
    ‎Convert the project from a one-shot role-sync script into a persistent Discord bot.
    ‎
    ‎Requirements:
    ‎
    ‎1. Keep Python and discord.py.
    ‎2. Keep python-dotenv and the existing .env configuration.
    ‎3. Keep SERVER_ID, CHANNEL_ID, MESSAGE_ID and ROLE_ID support.
    ‎4. Keep the existing add/remove synchronization functionality.
    ‎5. Keep --dry-run functionality for manual synchronization/testing.
    ‎6. The bot must remain connected and running instead of exiting after one synchronization.
    ‎7. Add Discord slash commands:
    ‎   /sync — synchronize the configured message and give Role Getter to eligible users.
    ‎   /remove-role — remove the configured r…
  3. Step 3

    ‎The upgrade is complete. Now package the ENTIRE updated project into a single ZIP file that I can download and move to Termux.
    ‎
    ‎Include all required project files:
    ‎- bot.py
    ‎- sync core
    ‎- database
    ‎- role sync
    ‎- requirements.txt
    ‎- README.md
    ‎- .env.example
    ‎- .gitignore
    ‎- every other Python/configuration file required to run the bot
    ‎
    ‎Do NOT include my actual .env or any Discord bot token/secrets.
  4. Step 4

    Added to termux on Android.
  5. Step 5

    Now added to github repo
    And ran dry test and real check.
  6. Step 6

    Finally uploaded project to an online server for 24/7 functionality.

Comments (3)

  1. Jack Herzlich · · 1 like

    This is amazing! This is the first discord bot i've seen posted here. Very cool, i'm sure many users will find this helpful. You've been on fire man 🔥

    1. Seagcz ·

      <div>Thank you.</div><div>Was inspired by a job task í found bút could pay for the plus plan so as to submit. So i still went for it. And i nailed it, looking forward to afd more features.</div><div><br></div>Nothing is to commpare to the fact that we not just building for cash but for purpose, fun, lifestyle and learning to do what we love and find interesting.

  2. Mandel · · 1 like

    <p>Going to join and test it. Will give honest feedback.</p>

    1. Seagcz ·

      Cool will be waiting. Just join and react on the message in the announcement channel

  3. Nuel develops · · 1 like

    <p>Admins setting it up inside Discord is the best part.</p>

    1. Seagcz ·

      No stress no additional coding experience needed soft life bot

13 likes · 6 comments · 10 views

Explore more on Prompted