Skip to content

Equal-Vote/discord-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

discord-bot

Discord bot for running star elections

Adding bot to a server

  1. Enable Developer Mode for your User: User Gear -> App Settings -> Advanced -> Developer Mode
  2. Add bot to server where you have admin access
  3. Reference bettervoting.py for commands (example: .list_star_candidates "Yoda" "Han Solo")

Running Personal Instance

  1. Clone the repository:
    git clone git@github.com:Equal-Vote/discord-bot.git
    cd discord-bot
  2. Install Dependencies: Ensure you have Python 3.10+ and pip installed. Then run:
    pip install -r requirements.txt
  3. Create a Discord Application and Bot User:
    • Go to the Discord Developer Portal.
    • Create a new application and add a Bot user.
    • Copy the Bot Token from the Developer Portal.
  4. Enable Priviledged Intents
    • Under your appication -> Bot -> Priviledged Gateway intents, enable all 3 intents
  5. Set environment variables: Create a .env file in the project directory, and:
    DISCORD_TOKEN=your-token-here
    Of course, use the token you copied in the previous step in place of your-token-here.
  6. Run the bot:
    python bettervoting.py
    If successful, you should see
    YourBotName#XXXX has connected to Discord!
    
  7. Invite the bot to your server:
    • In the Discord Developer Portal's OAuth2 tab, select the bot and applications.commands scopes.
    • Copy the generated invite link and open it in a browser.
    • Authorize the bot to join your server.

About

Discord bot for running star elections

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 3

  •  
  •  
  •