- Add the git hooks.
git config core.hooksPath .githooks
- This will enable pre-commit checks.
- Anaconda3
sudo apt-get install ffmpegsudo apt-get install libopus0
conda env create -f environment.ymlUpdates the current environment to be consistent with environment.yml.
conda env update --file environment.yml --pruneThe --prune option likely does not work correctly for pip packages. To ensure that an environment is perfectly in sync with the yml, use:
conda env create --force -f environment.ymlUpdates the environment.yml from the current environment.
conda env export | grep -v "^prefix: " > environment.ymlconda activate tts_botFollow instructions online, such as https://realpython.com/how-to-make-a-discord-bot-python/.
Create a .env file in the root directory and put your token in it:
# .env
DISCORD_TOKEN={your-bot-token}
GOOGLE_APPLICATION_CREDENTIALS={path to key file}
TTS_SPECIAL_CLIENT_URL={URL for the special client's HTTP endpoint}
If TTS_SPECIAL_CLIENT_URL is unset, special voices will be disabled and removed from the list of voices.
We use the Google Cloud Text-To-Speech API. You must enable the API and set up authentication: https://cloud.google.com/text-to-speech/docs/quickstart-client-libraries#before-you-begin
For local development, download service account credentials following these instructions and point the GOOGLE_APPLICATION_CREDENTIALS environment variable to the downloaded file.
If you are running the bot on Google Compute Engine, enable authenitcation by selecting "Allow full access to all Cloud APIs" during VM creation or while editing a stopped VM.
From the root directory (same directory that this README is in), run:
python -m main
The default command key is '. To override this to another character, set the DEV_CMD in your env file:
DEV_CMD=!
https://discord.com/api/oauth2/authorize?client_id=843357047192944709&permissions=3214336&scope=bot