No description
  • Go 99.7%
  • Dockerfile 0.3%
Find a file
2026-04-09 17:44:38 +08:00
.vscode add minimal telegram bot entrypoint 2026-04-07 22:01:40 +08:00
cmd/bot limited backfill for new subscriptions 2026-04-09 17:44:38 +08:00
db limited backfill for new subscriptions 2026-04-09 17:44:38 +08:00
fxembed add view_count to tweet evaluation 2026-04-08 17:05:19 +08:00
nitter add fxembed poller 2026-04-08 14:07:08 +08:00
poller limited backfill for new subscriptions 2026-04-09 17:44:38 +08:00
storage limited backfill for new subscriptions 2026-04-09 17:44:38 +08:00
tagutil add /sub list command 2026-04-08 08:53:13 +08:00
.dockerignore add dockerfile 2026-04-08 17:34:11 +08:00
.env.example restrict commands to allowed telegram user IDs 2026-04-08 20:01:50 +08:00
.gitignore serialize startup polls 2026-04-08 17:27:24 +08:00
Dockerfile add dockerfile 2026-04-08 17:34:11 +08:00
go.mod queue filtered tweets from active subscriptions 2026-04-08 15:51:17 +08:00
go.sum queue filtered tweets from active subscriptions 2026-04-08 15:51:17 +08:00
LICENSE fix typo 2026-04-07 14:36:42 +08:00
README.md add author block commands 2026-04-09 15:35:55 +08:00

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_TOKEN
  • TELEGRAM_ALLOWED_USER_IDS comma-separated Telegram user IDs allowed to manage the bot
  • SQLITE_PATH
  • NITTER_BASE_URL
  • FXEMBED_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_at has passed
  • evaluate active subscriptions every 5 minutes and queue matching deliveries
  • send queued deliveries every hour according to each target's rate limit