No description
- Go 99.7%
- Dockerfile 0.3%
| .vscode | ||
| cmd/bot | ||
| db | ||
| fxembed | ||
| nitter | ||
| poller | ||
| storage | ||
| tagutil | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| README.md | ||
illustration-bot
Run
cp .env.example .env
# edit .env
go run ./cmd/bot
The VS Code launch config reads ${workspaceFolder}/.env.
Required environment variables:
TELEGRAM_BOT_TOKENTELEGRAM_ALLOWED_USER_IDScomma-separated Telegram user IDs allowed to manage the botSQLITE_PATHNITTER_BASE_URLFXEMBED_BASE_URL
The current bot currently implements:
/help/sub add <tag>/sub remove <tag>/sub list/sub filter <tag> <expr>/sub filter-all <expr>/freq [max_per_hour]/enable true|false/block-author [author]/unblock-author <author>
Additional moderation behavior:
- when a delivered bot message receives a thumbs-down reaction, the bot deletes that message
- the reacted author is blocked for the current target and any queued deliveries from that author are expired
Background jobs currently:
- poll Nitter RSS every 40 minutes for enabled tags
- poll FxEmbed every 5 minutes for tweets whose
evaluate_after_athas passed - evaluate active subscriptions every 5 minutes and queue matching deliveries
- send queued deliveries every hour according to each target's rate limit