diff --git a/AGENTS.md b/AGENTS.md index 34e755e..745cc9e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,7 +4,7 @@ Telegram bot (teloxide) that turns post links from X/Twitter, Pixiv, Bluesky, Misskey (misskey.io), and Bilibili dynamics into media messages (images, video, GIF) with the post's title, author, and tags. It supports batch media splitting, retry with persistence, inline queries, forward-channel rebinding with caption templates, and Pixiv ugoira→MP4 transcoding. README is in Chinese; user-facing bot strings are in English. The project is a Rust port of a Python predecessor (see `queue.rs` comments referencing `utils/task_queue.py`). -Two-crate Cargo workspace (both v1.8.0, edition 2024, resolver 3): +Two-crate Cargo workspace (both v1.9.0, edition 2024, resolver 3): - **`crates/x-media`** — library that fetches and normalizes media from the four sites. Pure, no Telegram knowledge. - **`crates/xmedia-bot`** — the bot binary: teloxide dispatcher, SQLite-backed chat state, persistent task queue. diff --git a/Cargo.lock b/Cargo.lock index 2e648b9..a6976d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2879,7 +2879,7 @@ checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" [[package]] name = "x-media" -version = "1.8.0" +version = "1.9.0" dependencies = [ "bytes", "dotenv", @@ -2899,7 +2899,7 @@ dependencies = [ [[package]] name = "xmedia-bot" -version = "1.8.0" +version = "1.9.0" dependencies = [ "bytes", "dotenv", diff --git a/README.en.md b/README.en.md index d73908c..abce2f2 100644 --- a/README.en.md +++ b/README.en.md @@ -7,7 +7,7 @@ A Telegram bot that turns post links from X / Twitter, Pixiv, Bluesky, Misskey ( - Sending a link in a private chat fetches and sends the images, videos and GIFs automatically; oversized media is split into batches (10 items per group) - Text-only posts report "no media"; unsupported links are silently ignored. Fetch failures name the reason (post gone / content withheld / source risk control / site not enabled) - Long posts (text ≥ `CAPTION_QUOTE_TEXT_CHARS`, default 200) show **the text part** of their caption inside a collapsible blockquote, with the link and author line left outside it -- Inline queries (`@bot `) — except Pixiv images and locally transcoded animations, which Telegram cannot fetch (no Referer) and would show broken, so they are skipped; a supported link posted in a group gets a one-line hint to use the private chat or inline mode (channels stay silent) +- Inline queries (`@bot `) — except Pixiv images and locally transcoded animations, which Telegram cannot fetch (no Referer) and would show broken, so they are skipped (such a query answers empty rather than spinning or re-fetching); a supported link posted in a group gets a one-line hint to use the private chat or inline mode (channels stay silent) - `/start` explains the supported sites and how to use it; `/help` lists the commands plus argument syntax, the caption placeholders and the private-chat rule; the bot's profile description texts are set at startup - `/settings` shows this chat's configuration (forward channel, edit-before-forward, per-site caption formats, saved templates); templates are added with `/set_template` and removed with `/remove_template` - Bind a forward channel for automatic forwarding; edit the caption before forwarding and apply custom templates (the prompt carries Confirm / Skip buttons, states its expiry, and is marked expired in place once it lapses) diff --git a/README.md b/README.md index 6db2594..a4f2ecb 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Telegram 机器人,将 X / Twitter、Pixiv、Bluesky、Misskey (misskey.io)、 - 私聊发送链接后自动抓取并发送图片、视频与 GIF,超量图片自动分批(每批 10 张) - 纯文字帖提示无媒体;不支持的链接静默忽略。抓取失败会按原因分别提示(帖子已删除 / 内容受限 / 源站风控 / 站点未启用) - 长帖(正文 ≥ `CAPTION_QUOTE_TEXT_CHARS`,默认 200)的**正文部分**用可折叠引用块展示,链接与作者行留在引用块外 -- 支持内联查询(`@机器人 <链接>`;Pixiv 图片与本地转码的动图不支持内联 —— Telegram 取图时无法携带 Referer,会显示破图,因此跳过);在群聊里发链接会提示改用私聊或内联查询(频道内保持静默) +- 支持内联查询(`@机器人 <链接>`;Pixiv 图片与本地转码的动图不支持内联 —— Telegram 取图时无法携带 Referer,会显示破图,因此跳过;这类查询直接返回空结果,不会一直转圈或反复请求);在群聊里发链接会提示改用私聊或内联查询(频道内保持静默) - `/start` 说明支持的站点与用法,`/help` 列出命令、参数格式、caption 占位符与私聊限制;bot 资料页(description / short description)启动时一并设置 - `/settings` 查看本聊天配置(转发频道、转发前编辑开关、各站点 caption 格式、模板列表);模板可用 `/set_template` 增、`/remove_template` 删 - 可绑定转发频道自动转发;支持转发前编辑 caption 与自定义模板(提示消息带 Confirm / Skip 按钮并写明过期时间,过期后就地标记为已过期) diff --git a/crates/x-media/Cargo.toml b/crates/x-media/Cargo.toml index 8d32333..af0ffb9 100644 --- a/crates/x-media/Cargo.toml +++ b/crates/x-media/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "x-media" -version = "1.8.0" +version = "1.9.0" edition = "2024" [dependencies] diff --git a/crates/xmedia-bot/Cargo.toml b/crates/xmedia-bot/Cargo.toml index aa04b4f..1c50e63 100644 --- a/crates/xmedia-bot/Cargo.toml +++ b/crates/xmedia-bot/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xmedia-bot" -version = "1.8.0" +version = "1.9.0" edition = "2024" [dependencies]