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
mov-to-mp4
Converts .mov (H.264/AAC) to .mp4 in the Worker — rewrites ftyp and applies faststart (moov-before-mdat)
mkv-to-mp4
Converts .mkv to .mp4 in the Worker — remuxes Matroska into MP4 without re-encoding; drops audio MP4 players can't decode (e.g. Vorbis)
unit-converter
Converts imperial ↔ metric units found in message text (temperature, length, weight, volume, speed)
tldr
Summarises long messages using Cloudflare AI (bart-large-cnn)
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.