Tethics hack, this is the tethics bot.
Maintainers: andrew (msg @andrew in Tethics Roundtable for help)
-
Clone the source
git clone git@github.com:ajroberts0417/tethics-bot.git
-
Navigate into the project directory
cd tethics-bot
-
Install dependencies
pipenv install
-
Create a bot account and add it to your test discord server following this guide https://discordpy.readthedocs.io/en/latest/discord.html
-
Create a file
.env
with keys AIRTABLE_API_KEY, AIRTABLE_BASE, and DISCORD_TOKEN from Airtable and from the Discord bot in the format: KEY="[ key ]" -
Enter the pipenv virtual environment
pipenv shell
-
Run the bot:
python bot.py
Boom! You're now hosting Tethics locally.
Follow the quickstart guide to clone the source.
We use Black for code formatting.
Before submitting code run: pipenv run black .
to autoformat your code.
- A version of python 3.8 installed and added to your PATH (for help: install python 3)
- A version of pipenv installed
Managing python environments can be tricky, even for experienced developers. One easy tool to do so is pyenv.
Here's how you can use a python 3.8 environment in your tethics-bot
directory:
- Install pyenv (see pyenv installer)
curl https://pyenv.run | bash
1.5.
-
Install the latest version of python 3.8 using pyenv
pyenv install 3.8.6
-
Use this version locally in your tethics-bot project (Note: make sure you're in the tethics-bot directory)
pyenv local 3.8.6
3b. Alternatively, if you want 3.8.6 to be your global version of python:
pyenv global 3.8.6