VC Roles, TTS & more!
This is a bot that will make your server and voice channels much more interactive, with the ability to give a user a role when they join a voice channel, remove it when they leave the channel, sending TTS messages into voice channels for those times when you can't speak, creating and managing voice channels and more! This is the bot you need to make your servers more interactive, and to help bring a community together.
VC Roles is open source here, and we welcome any pull requests!
Please note however that this code is intended for educational purposes only, and we will not provide support for self-hosting the bot.
We reccomend using a virtual environment for python. You can do this by:
- Creating a new virtual environment called env
py -m venv env
orpython3 -m venv env
- Activating the virtual environment
.\env\Scripts\activate
orsource env/bin/activate
- Install the project dependencies
pip install -r requirements.txt
To get the bot running, you must configure a number of things.
# /config.py
BOT_TOKEN: str = # the discord bot token
ENVIRONMENT: Literal["DEV", "PROD"] = # how to run the bot (such as whether to use topgg integration)
WEBSERVER_PORT: int = # the port to listen for offline status requests
GUMROAD_PRODUCT_ID: str = # the gumroad product id
class REDIS:
HOST: str = # the redis host
PORT: int = # the redis port
DB: int = # the redis db to use
PASSWORD: str = # the password to authenticate
class DBL: # dbl (TopGG)
TOKEN: str = # the dbl token
WEBHOOK_PASSWORD: str = # the password needed to authenticate
WEBHOOK_PORT: int = # the port to listen on
# /.env
DATABASE_URL="" # the postgres connection string
Use the 'Black' python code formatter.
- Install with:
python -m pip install black
orpip install black
- Run formatter in terminal with:
python -m black .
orblack .
When cloning the repo for new, make sure you:
pip install pre-commit
pre-commit install
Now using stable discord.py release discord.py[voice]