The bot for my discord server. https://discord.gg/mr-rivers-neighborhood Obviously there are many missing tokens and secrets in this repo, so I'm not sure how useful it will be to anyone else. But, ideally, others could figure out how to help me improve it or make improvements themselves.
https://discord.com/developers
where python
"C:\Users\aethe\AppData\Local\Programs\Python\Python310\python" -m venv .G "C:\Users\Rivers Cuomo\AppData\Local\Programs\Python\Python310\python.exe" -m venv .9
pip install -r requirements.txt
(this one is necessary to run the tests from the root directory with pytest)
PYTHONPATH=%cd%
CLIENT_ID =
CLIENT_SECRET =
TOKEN = its another secret looking string from discord?
REPLICATE_API_TOKEN =
OPENAI_API_KEY=
gspreader
[service account]Heroku.Settings.configVariables: GSPREADER_GOOGLE_CREDS
json object . Gspreader uses the gspreader.json
method to get the creds.
.env: it still has access to a file using the gspreader.path
method to GSPREADER_GOOGLE_CREDS_PATH
=C:\RC Dropbox\Rivers Cuomo\Apps\credentials\rctweetcleaner-3d2160633739.json
firestore
and google drive
[service account]Heroku.Settings.configVariables: GOOGLE_CREDENTIALS
json object.
.env: I think it's just authorizing itself by using the riverscuomo-8cc6c....json
cred file in the top level of the project. This file is not commited to git/github but it is avaialable in the directory via dropbox.
py.main.py
in the top level directory
press play in the debugger in vscode on the main.py
file
This is probably just for me.
heroku login
git push heroku main
one time I had to add -f
Unit tests can be found in the folder tests/unit_tests
, and they can be executed with the following command (from the repository root directory):
PYTHONPATH=. pytest tests/unit_tests
If you do not have pytest
installed, refer to https://docs.pytest.org/en/stable/getting-started.html
Most of the interesting code is in bot/on_message folder and bot/scripts folder.
in discord_bot.