.env.sample | ||
Dockerfile | ||
last_id.txt | ||
README.md | ||
requirements.txt | ||
welcomebot.py |
Welcomebot
A simple welcomebot for Mastodon instances. Fork https://github.com/caffeinewriter/botvenon
Usage
Requires Python3 and pip.
Run pip install -r requirements.txt
.
See the included .env.sample
file for information on configuration.
To work effectively, the account this bot is running on must be a default follow on your instance.
Docker support is in progress.
To use the docker version, build it, and run it with:
docker build -t botvenon .
docker run --mount source=data-volume,target=/data -it botvenon:latest
Prerequisite
You need client_id, client_secret and access_token that you can retrieve with the following commands
curl -X POST -d "client_name=NOMECLIENT&redirect_uris=urn:ietf:wg:oauth:2.0:oob&scopes=read+write+follow+push" -Ss https://mastodon.bida.im/api/v1/apps esempio risposta {"id":"1162403","name":"welcome-from-admin","website":null,"redirect_uri":"urn:ietf:wg:oauth:2.0:oob","client_id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxx","client_secret":"YYYYYYYYYYYYYYYYYYYYYYYYYY","vapid_key":"QUALCOSAQUALCOSAQUALCOSAQUALCOSA"} curl -X POST -d "client_id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx&client_secret=YYYYYYYYYYYYYYYYYYYYYYYYYY&grant_type=password&username=ZZZZZZZZZZZZZZZZ&password=LLLLLLLLLLLLLL" -Ss https://mastodon.bida.im/oauth/token esempio risposta {"access_token":"TOKENTOKENTOKEN","token_type":"Bearer","scope":"read","created_at":1609082262}