BobTheArrow is a fully modular multi purpose discord bot.
- Music Player
- Game statistics retrieval (Marvel Rivals, League of Legends, Warframe)
- Server moderation tools
- Command based configuration for each server
- python3
- pip
- ffmpeg
- Python packages:
- discord
- python-dotenv
- requests
- pytz
- certifi
- yt-dlp
Install Python 3 and pip depending on your OS:
- Windows: Download and install from Python.org, ensure
pipis installed. - Linux: Install via package manager:
sudo apt update && sudo apt install python3 python3-pip
Ensure pip is updated:
python3 -m ensurepip --default-pip
python3 -m pip install --upgrade pip
Install ffmpeg depending on your OS:
- Windows: Download and install from FFmpeg.org
- Linux: Install using apt:
sudo apt update && sudo apt install ffmpeg
It is recommended to create a virtual environment before installing dependencies:
python3 -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
Once inside the virtual environment, install the required Python packages using pip:
pip install -r requirements.txt
Configuration settings are stored in the config.py file
- DBDefaults:
default_lang: Sets the default language the bot uses for each server.default_command_prefix: Sets the default command prefix the bot uses for each server.
- Paths:
download_path: The path of the folder where the bot downloads the music.database_path: The path of the JSON file containing the database.
- Components:
setlang: Enables or disables to change the language of the bot through a command.musicplayer: Enables or disables the music player.rivalsapi: Enables or disables the Marvel Rivals API.lolapi: Enables or disables the League of Legends API.wfapi: Enables or disables the Warframe API.membercount: Enables or disables the membercount function.moderation: Enables or disables the moderation functions.welcome: Enables or disables welcome messages.clear: Enables or disables the clear command.prefixchange: Enables or disables the command prefix change function.systemmessage: Enables or disables the system message command.serverstats: Enables or disables the Server statistics function.
- rename the
example.envfile to.env
- Go to the Discord Developer Portal.
- Create a new application and navigate to the Bot section.
- Click Add Bot, configure its settings, and copy the Bot Token.
- Store the token securely in a
.envfile:DISCORD_TOKEN=your-bot-token-here
- Go to MarvelRivalsAPI.com and sign up for an API key.
- Store the API key in the
.envfile:RIVALS_API_KEY=your-api-key-here
- Go to Riot Games Developer Portal and sign up for an API key.
- Store the API key in the
.envfile:LOL_API_KEY=your-api-key-here
- The Warframe API needs no key.
- Get the Guild ID of your discord server:
- Enable Developer Mode in Discord:
- Open User Settings → Advanced → Enable Developer Mode.
- Right-click your Discord server icon and click "Copy Server ID".
- Enable Developer Mode in Discord:
- Make a script like the one below on your game server that sends the player count to the API every XY seconds (the maximum is 10 requests every 60 sec).
import requests params = { "server_id": <(your servers guild id)>, "server_name": "example", "max_players": 100, "current_players": 1, "image": "https://example.com/example.png" } response = requests.post("http://127.0.0.1:5000/gameserver/update", params=params)
- To start the bot, activate the virtual environment and execute the following command:
source venv/bin/activate # On Windows use `venv\Scripts\activate`
python3 bot.py
Ensure your .env file is properly configured with the bot token and other necessary credentials.
Marvel Rivals statistics: MarvelRivalsAPI
Warframe information: WarframeStatus API
If you encounter any issues, feel free to open an issue here on GitHub or contact me on Discord.
Discord: lightning7510
