telegram
Send messages, photos, and files via Telegram Bot API. Use when you need to send notifications, alerts, or content to Telegram chats, channels, or groups. Supports text formatting, media, and inline keyboards.
- License 许可
- MIT
- 最近更新
- 2026-04-05
- Stars
- ★ 7
- Forks
- 1
01 前言 Front Matter
- name
- telegram
- description
- Send messages, photos, and files via Telegram Bot API. Use when you need to send notifications, alerts, or content to Telegram chats, channels, or groups. Supports text formatting, media, and inline keyboards.
02 资源文件 1
- 参考文档_meta.json269 B
03 SKILL.md 正文
Telegram Bot API
Send messages to Telegram using a bot token.
Setup
- Create bot via @BotFather on Telegram
- Copy the bot token
- Store token:
mkdir -p ~/.config/telegram
echo "YOUR_BOT_TOKEN" > ~/.config/telegram/bot_token
- Get chat ID: Send
/startto your bot, then visit:https://api.telegram.org/bot<TOKEN>/getUpdates
Send Text Message
TOKEN=$(cat ~/.config/telegram/bot_token)
CHAT_ID="123456789"
curl -s -X POST "https://api.telegram.org/bot${TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d "{\"chat_id\": \"${CHAT_ID}\", \"text\": \"Hello from Clawdbot!\"}"
Formatting (MarkdownV2)
curl -s -X POST "https://api.telegram.org/bot${TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'$CHAT_ID'",
"text": "*Bold* _italic_ `code` [link](https://example.com)",
"parse_mode": "MarkdownV2"
}'
Escape these chars in MarkdownV2: _*[]()~>#+-=|{}.!
Send Photo
# From URL
curl -s -X POST "https://api.telegram.org/bot${TOKEN}/sendPhoto" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'$CHAT_ID'",
"photo": "https://example.com/image.jpg",
"caption": "Image caption"
}'
# From file
curl -s -X POST "https://api.telegram.org/bot${TOKEN}/sendPhoto" \
-F "chat_id=${CHAT_ID}" \
-F "photo=@/path/to/image.jpg" \
-F "caption=Image caption"
Send Document
curl -s -X POST "https://api.telegram.org/bot${TOKEN}/sendDocument" \
-F "chat_id=${CHAT_ID}" \
-F "document=@/path/to/file.pdf" \
-F "caption=File description"
Inline Keyboard (Buttons)
curl -s -X POST "https://api.telegram.org/bot${TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'$CHAT_ID'",
"text": "Choose an option:",
"reply_markup": {
"inline_keyboard": [[
{"text": "Option A", "callback_data": "option_a"},
{"text": "Option B", "callback_data": "option_b"}
]]
}
}'
Silent Message
curl -s -X POST "https://api.telegram.org/bot${TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'$CHAT_ID'",
"text": "Silent notification",
"disable_notification": true
}'
Get Updates (Polling)
curl -s "https://api.telegram.org/bot${TOKEN}/getUpdates" | jq
Error Handling
Check ok field in response:
{"ok": true, "result": {...}}
{"ok": false, "error_code": 400, "description": "Bad Request: chat not found"}
Common Chat IDs
- User chat: Positive number (e.g.,
123456789) - Group: Negative number (e.g.,
-123456789) - Channel:
@channel_usernameor negative ID
Rate Limits
- 30 messages/second to same chat
- 20 messages/minute to same group
- Bulk: 30 messages/second across all chats
04 同仓库更多 Skills
zyfai
Earn yield on any Ethereum wallet on Base, Arbitrum, and Plasma. Use when a user wants passive DeFi yield on their funds. Deploys a non-custodial subaccount (Safe) linked to their EOA, enables automated yield optimization, and lets them deposit/withdraw anytime.
zerion-api
暂无简介
zerion-api-skill
暂无简介
zerion-api-mcp
暂无简介
yahoo-finance-forex
Fetches real-time FOREX news and market data from Yahoo Finance for major currency pairs (EUR/USD, GBP/USD, USD/JPY, etc.). Analyzes sentiment and provides trading context.
yahoo-finance
This skill should be used when the user asks to "get stock prices", "check stock quotes", "look up earnings", "get financial data", "find trending stocks", or needs stock market data from Yahoo Finance.