amshin98 / second-strike-bot

Discord bot for setting up games
Apache License 2.0
0 stars 1 forks source link

Second Strike Bot

Discord bot for setting up games in a small Valorant league I have with my friends.

Current Features

Limitations

Getting Started

Prerequisites

Setup

0. Discord bot setup

This section is only necessary once to add the bot to your server.

  1. Follow this setup guide. Be sure to save your bots token for later!
  2. Uncheck the "PUBLIC BOT" setting, unless you want other people to use the bot
  3. Enaable the "MESSAGE CONTENT INTENT" setting
  4. Follow this setup guide until you get to the Adding scopes and permissions section
  5. For the "BOT PERMISSIONS" section, add the following permissions: [] Send Messages [] Add Reactions [] Read Messages / View Channels
  6. Continue the the setup guide until you reach the "Running your app" section

1. Installing dependencies

  1. Clone this repo
  2. Run [python -m venv env](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/) in the root folder (the top-level second-strike-bot one). This will create a new env directory
  3. Run the activate script in this newly created directory to create an isolated virtual development environment
    • Windows: .\env\Scripts\activate
    • Unix: source env/bin/activate
  4. Run pip install -r requirements.txt

2. Setting up your .env file

  1. Create a file called .env in the root folder
  2. Add this line: DISCORD_TOKEN=token_from_step_0.1_here
  3. Add this line: DISCORD_GUILD="Your Server Name Here" (with the quotes)

Development

Branch per feature with codeowner reviews.

Linting: black <path/to/second_strike_bot>

Code style: black

Using the Bot

Hosting/Deployment

With your virtual environment activated, simply run the bot.py file (python second-strike-bot\second_strike_bot\bot.py). You should see your bot come online. Keep in mind that you need to be running the script in order for the bot to function. AWS EC2 or a Raspberry Pi would let you run this 24/7.

Setting up a match

All you need to do is send a /setup command in a text channel and follow the messages/instructions from there. Here's an example text/voice channel setup:

image

License

This project is licensed under the Apache License - see the LICENSE file for details

Acknowledgments