← 返回
未分类 Key 中文

Telegram Bot

Create and manage Telegram bots. Use when user wants to build a Telegram bot for notifications, automation, customer support, group management, or interactiv...
创建与管理 Telegram 机器人,适用于通知、自动化、客服、群组管理或交互场景
dinghaibin dinghaibin 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 311
下载
💾 0
安装
1
版本
#latest

概述

Telegram Bot

Create and manage Telegram bots using the Bot API.

Quick Start

# Get bot token from @BotFather on Telegram
# Create bot.py:
python scripts/bot.py --token YOUR_TOKEN --handler my_handler.py

Bot Creation Steps

  1. Open Telegram, search for @BotFather
  2. Send /newbot to create new bot
  3. Get API token
  4. Configure webhooks or polling

Core Features

  • Commands: /start, /help, /settings
  • Callbacks: Inline buttons, queries
  • Groups: Admin tools, filters
  • Webhooks: Receive updates via HTTP

Script Usage

python scripts/bot.py [OPTIONS]

Options:
  --token TEXT        Bot API token (required)
  --handler PATH      Python handler file
  --webhook-url URL   Webhook endpoint URL
  --port PORT         Webhook server port (default: 8443)
  --poll              Use long polling instead of webhook

Handler Format

# my_handler.py
def handle_update(update, context):
    """Handle incoming updates."""
    if update.message:
        text = update.message.text
        if text == "/start":
            context.bot.send_message(
                chat_id=update.message.chat_id,
                text="Hello! I'm your bot."
            )

Examples

See references/examples.md for:

  • Echo bot
  • Inline keyboard bot
  • Group admin bot
  • Notification bot
  • Weather bot

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-08 00:58 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

suspicious
查看报告

🔗 相关推荐

ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,170 📥 942,582
ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 871 📥 349,071
ai-agent

Find Skills

root
帮助用户发现和安装智能体技能,当用户询问如「如何做X」、「找X的技能」、「有能做...的吗」等问题时
★ 1,523 📥 580,275