zhuli-bot

A Telegram bot running on Cloudflare Workers — extensible via plugins.

Send a message or file to the bot and it routes it to the best matching plugin based on file type, MIME type, text patterns, and keywords.

Built-in plugins

HTTP (external) plugins

Register external plugins at runtime with /add_plugin. The Worker POSTs a PluginRequest to the plugin's endpoint and expects a PluginResponse back.

Request{ message, file_url, chat_id }
Response{ type: 'text' | 'file' | 'binary' | 'noop', ... }

Scoring

File extension match+100
MIME type match+80
Text pattern (regex)+20
Keyword match (per keyword)+5

Highest score wins; priority breaks ties.