返回顶部
t

telegram-auto-topic

>

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.8
安全检测
已通过
3,079
下载量
3
收藏
概述
安装方式
版本历史

telegram-auto-topic

# Telegram Auto-Topic Add `/topic` to the start of any message in a Telegram forum group → a new topic is created from it. The title is figured out from your message automatically — no need to think of one yourself. ### Example **1.** You send a message starting with `/topic`: > /topic @your_bot I need to look into renewing my passport before March **2.** A new forum topic **"Passport Renewal Before March"** is created with your message quoted inside it. You get a reply linking directly to the new topic. ## Prerequisites - The group must be configured in OpenClaw (`channels.telegram.groups.<CHAT_ID>`) — this is how OpenClaw knows to process messages from it. - The group must have **forum/topics** enabled. - Your bot must be an admin in the group with **Manage Topics** permission. ## Handling /topic When a message starts with `/topic`: 1. Generate a concise 3-7 word title summarising the message. 2. Run the script — replace placeholders with actual values from the message context: ``` scripts/telegram-auto-topic.sh <chat_id> <message_id> "<sender name>" "<title>" "<text after /topic>" ``` Pass an empty string for the text arg if there's no text (e.g. media-only). Use the path relative to this skill's directory. 3. The script returns JSON with `topic_id`, `title`, and `link`. 4. Reply to the original message with: `Topic created → [<title>](<link>)` 5. Then send a response to the actual message content in the NEW topic (use message tool with `threadId` from the returned `topic_id`). Respond naturally as you would to any message. 6. After both replies are sent, respond with NO_REPLY. ## How It Works 1. You send a message starting with `/topic` 2. A new forum topic is created — titled from your message automatically 3. Your message is quoted in the new topic with your name 4. You get a reply with a clickable link to the new topic 5. The bot responds to your message in the new topic Works with media too — photos, videos, or documents with `/topic` in the caption get forwarded into the new topic. ## Script Reference ```bash scripts/telegram-auto-topic.sh <chat_id> <message_id> <sender> [title] [text] ``` | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `chat_id` | arg | yes | Supergroup chat ID (negative number) | | `message_id` | arg | yes | Original message to quote | | `sender` | arg | yes | Display name of original sender | | `title` | arg | no | Topic title. Falls back to first ~50 chars of text if omitted | | `text` | arg | no | Message body after `/topic`. If empty, forwards as media | Returns JSON: `{"topic_id": 123, "title": "Used title", "link": "https://t.me/c/..."}` ## Optional configuration **Skip the @bot mention** — by default, the bot only responds when mentioned. To use `/topic` without mentioning the bot: ```json "channels.telegram.groups.<CHAT_ID>": { "requireMention": false } ``` **Telegram autocomplete** — to get `/topic` in Telegram's command menu, add under `channels.telegram`: ```json { "customCommands": [ { "command": "topic", "description": "Create a new forum topic from a message" } ] } ``` ## Limitations - **Attribution:** Quoted messages appear as sent by the bot (Telegram API limitation). Sender name is included as attribution text below the quote. - **Media:** Forwarded media shows a "Forwarded from" header — best available but not native. - **Forum groups only:** Won't work in regular groups or DMs. - **Permissions:** Bot needs admin with Manage Topics. - **Title length:** Telegram caps topic names at 128 characters.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 telegram-auto-topic-1776367608 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 telegram-auto-topic-1776367608 技能

通过命令行安装

skillhub install telegram-auto-topic-1776367608

下载 Zip 包

⬇ 下载 telegram-auto-topic v0.1.8

文件大小: 4.46 KB | 发布时间: 2026-4-17 15:45

v0.1.8 最新 2026-4-17 15:45
- Removed README.md, consolidating documentation into SKILL.md.
- Core script (scripts/telegram-auto-topic.sh) remains; main usage and configuration instructions are now in SKILL.md only.
- No functional changes to scripts; this update streamlines the documentation format.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部