A self reporting bot for the movement model
/report
- creates a private message to the user with a link the reporting form/join
- Join a guild where this command is run/update
- Update a profile for a given community/add_onboarding_contributions
- Ask user whether they have completed the initial contributions
- Clone this repository.
- Setup environment variables:
cp env.example .env
- Install Redis CLI tools.
- start the redis server, if not running.
- To open the Redis REPL, run:
redis-cli
- In Redis REPL, to stream back every command processed by the Redis server, run
monitor
orredis-cli monitor
directly in cmd. - In your .env file, set the redis url to your local instance
REDIS_URL=redis://localhost
There are available GUI alternative e.g. DBngin; It’s a hassle-free way to manage the local Redis database servers.
- Run protocol API server. To learn about how to setup local protocol API, check Protocol API's README
- update
PROTOCOL_URL
env variable with Protocol API URL.
- Create a virtual environment
with python
3.8
. - Install dependencies via pip:
poetry run pip install -r requirements-dev.txt
. - You can run & test using nx, check project.json.
- Or you can directly run using command line:
- run:
poetry run make
- test:
poetry run make test
- run:
To develop in vscode's dev container, you can follow this documentation, using From Dockerfile.
- Open
Run and Debug
- Select
Python:Bot
and click Run Button - Stop when done testing bot
- Open
Testing
- Click the Run or Debug Button
Run and Debug
Add Configuration...
Python
Python File
- Set
name
toPython: Bot
- Set
program
tobot/
- Create a new folder
- add a
bot
folder with these files:- init.py
- main.py
- commands.py
Docker: Add Docker files to Workspace
- Application Platform:
Python: General
- App's Entry Point:
bot/__main__.py
- Include optional Docker Compose files:
no
- Application Platform:
Remote-Containers: Open Folder in Container
- select parent folder and click Open
From Dockerfile
- Add extensions to Dev Container for development
Python
- Open Terminal and run the following in the Dev Container
python bot/__main__.py
ctrl
-c
to stop bot
MIT © Govrn