Token导航 LogoToken导航TokenDH.com
开发需要联网clawhub未标认证来源可访问clear审计通过

telegram-bot-apiTelegram 机器人 API

Agent Skill

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

总安装

18,695

周安装

749

GitHub Stars

公开资料未说明

下载量

6,052
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:telegram-bot-api(Telegram 机器人 API)
来源仓库:https://github.com/ivangdavila/telegram-bot-api
安装命令:
openclaw skills install telegram-bot-api
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install telegram-bot-api

简介

使用正确的 API 调用、消息格式、键盘和 Webhook 设置构建 Telegram 机器人。

SKILL.md

name
Telegram Bot API
slug
telegram-bot-api
version
1.0.0
homepage
https://clawic.com/skills/telegram-bot-api
description
Build Telegram bots with correct API calls, message formatting, keyboards, and webhook setup.
metadata
{"clawdbot":{"emoji":"🤖","requires":{"bins":["curl"]},"os":["linux","darwin","win32"]}}

Setup

On first use, read setup.md for integration guidelines.

When to Use

User needs to interact with the Telegram Bot API. Building bots, sending messages, handling updates, setting up webhooks, creating keyboards, or managing bot commands.

Architecture

Memory lives in ~/telegram-bot-api/. See memory-template.md for structure.

~/telegram-bot-api/
├── memory.md          # Bot tokens, preferences, defaults
├── bots/              # Per-bot configurations
│   └── {botname}.md   # Token, webhook URL, defaults
└── templates/         # Reusable message templates

Quick Reference

TopicFile
Setup processsetup.md
Memory templatememory-template.md
All API methodsmethods.md
Message formattingformatting.md
Keyboards & buttonskeyboards.md
Webhooks & pollingwebhooks.md
Media handlingmedia.md
Error codeserrors.md

Core Rules

1. API Base URL

All requests go to:

https://api.telegram.org/bot{TOKEN}/{METHOD}

Never expose the token in logs or user-visible output.

2. Required Parameters by Method

MethodRequiredOptional (common)
sendMessagechat_id, textparse_mode, reply_markup, disable_notification
sendPhotochat_id, photocaption, parse_mode
sendDocumentchat_id, documentcaption, thumbnail
getUpdatesoffset, limit, timeout
setWebhookurlcertificate, max_connections
deleteWebhookdrop_pending_updates
getMe

3. Parse Mode Selection

FormatUse whenEscape chars
MarkdownV2Rich formatting needed_*[]()~\>#+-={}.!`
HTMLComplex nesting, safer<>&
NonePlain text onlyNone

Default to HTML — fewer escape issues than MarkdownV2.

4. Chat ID Types

TypeFormatExample
UserPositive integer123456789
GroupNegative integer-123456789
Supergroup/Channel-100 prefix-1001234567890

5. Rate Limits

ScopeLimit
Same chat1 msg/sec
Different chats30 msg/sec
Groups20 msg/min per group
Bulk notificationsUse sendMessage with different chat_ids

When hitting 429 errors, use exponential backoff starting at retry_after seconds.

6. Message Length Limits

TypeLimit
Text message4096 chars
Caption1024 chars
Callback data64 bytes
Inline query256 chars

Split long messages at sentence boundaries, not mid-word.

7. Keyboard Best Practices

Inline keyboards (in message):

  • Max 8 buttons per row
  • Max 100 buttons total
  • Use callback_data for bot actions
  • Use url for external links

Reply keyboards (below input):

  • Use for frequent options
  • one_time_keyboard: true to hide after use
  • resize_keyboard: true for better mobile UX

Common Traps

  • Forgetting to escape MarkdownV2 → Message fails silently or partially. Use HTML instead, or escape all special chars.
  • Using wrong chat_id format → Groups need negative IDs. Supergroups/channels need -100 prefix.
  • Not handling 429 errors → Bot gets temporarily blocked. Always implement retry logic.
  • Exposing bot token → Anyone can control your bot. Never log or display tokens.
  • Sending too fast to groups → 20 msg/min limit. Queue messages with delays.
  • Large file uploads → 50MB limit for sendDocument. Use URL method for larger files.
  • Webhook not HTTPS → Telegram requires valid SSL certificate.

External Endpoints

EndpointData SentPurpose
https://api.telegram.org/bot{TOKEN}/*Messages, media, commandsAll bot operations

No other data is sent externally. Bot token is required for all requests.

Security & Privacy

Data that leaves your machine:

  • Messages and media sent via the Bot API
  • Bot token in every request (required by Telegram)

Data that stays local:

  • Bot configurations in ~/telegram-bot-api/
  • Message templates

This skill does NOT:

  • Store message content long-term
  • Access user data beyond what Telegram provides
  • Make requests to endpoints other than api.telegram.org

Trust

By using this skill, data is sent to Telegram's Bot API servers. Only install if you trust Telegram with your bot's messages.

Related Skills

Install with clawhub install <slug> if user confirms:

  • api — REST API best practices
  • http — HTTP protocol essentials
  • json — JSON parsing and manipulation

Feedback

  • If useful: clawhub star telegram-bot-api
  • Stay updated: clawhub sync

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

85.13%
按下载量换算5,152

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills