Handy companion for @assthread -- pseudo-anonymous chatting place with free speech and no censorship.
/start
- start the bot/test
- check if the bot is alive/whoami
- returns your Telegram ID and username/uname
- returnsuname -a
output/hash
- checks if runningmain.py
is equal to what is in themaster
branch/loglevel
- [admin only] change log level during runtime/ping
- [admin only] check if bot is able to reach specified user ID (or everyone from subscribers list if no ID is specified)/send_poll
- [admin only] start activity check poll for all subscruibers/stop_poll
- [admin only] stop activity check poll (on reply to poll message)/request_admin
- request admin privileges
- Create new bot via @BotFather and get bot token.
- Add bot to your channel and grant it admin privileges.
- Obtain
API_ID
andAPI_HASH
from my.telegram.org (this is required for some user interactions).
Regenerate cfg.py
file:
docker run -it \
-e API_ID=<...> \
-e API_HASH=<...> \
-e LOGLEVEL=INFO \
-e CHANNEL=<...> \
-e BOT_NAME=<...> \
-v $(pwd):/workspace \
-u $(id -u):$(id -g) \
ghcr.io/tsunamaru/assbot/base:latest \
python helpers.py
Build it:
docker build . \
-f build/ci-build.Dockerfile \
-t ghcr.io/tsunamaru/assbot/ci-build:latest
Run it:
docker run -it \
-e TOKEN=<...> \
-e CHANNEL=<...> \
-e LOGLEVEL=INFO \
-e ADMIN=<...> \
ghcr.io/tsunamaru/assbot/ci-build:latest
Virtualenv usage is optional, but highly recommended:
virtualenv venv
source venv/bin/activate
Install dependencies:
pip install -r requirements.txt
Make your own .env
file and fill it with your data:
cp .env.example .env
vim .env
Regenerate cfg.py
file:
python3 helpers.py
Run it:
python3 main.py
See example in ./k8s directory.