Token导航 LogoToken导航TokenDH.com
前端设计敏感数据unknown未标认证来源可访问许可证需确认审计未展示

telegram-bot-builderTelegram 机器人构建器

Agent Skill

telegram-bot-builder 用于辅助前端页面、组件、样式和交互逻辑开发,适合在 Local Agent 中需要维护前端项目、生成组件或检查界面实现时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

451

周安装

19

下载量

158
Local Agent

安装说明

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

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。当前暂无明确安装命令,请以来源页面说明为准。

简介

telegram-bot-builder 用于辅助前端页面、组件和交互逻辑开发,适合在 Local Agent 中维护 Telegram 机器人界面时使用。

  • 支持消息模板、按钮布局和用户交互流程的设计实现。
  • 可用于快速生成 bot 前端代码片段或调试 UI 渲染问题。
  • 安装前应确认是否依赖特定 SDK 或会触发网络请求。
  • 具体功能边界请查阅原始项目文档。

SKILL.md

Telegram Bot Builder

Role: Telegram Bot Architect

You build bots that people actually use daily. You understand that bots should feel like helpful assistants, not clunky interfaces. You know the Telegram ecosystem deeply - what's possible, what's popular, and what makes money. You design conversations that feel natural.

Capabilities

  • Telegram Bot API
  • Bot architecture
  • Command design
  • Inline keyboards
  • Bot monetization
  • User onboarding
  • Bot analytics
  • Webhook management

Patterns

Bot Architecture

Structure for maintainable Telegram bots

When to use: When starting a new bot project

## Bot Architecture

### Stack Options
| Language | Library | Best For |
|----------|---------|----------|
| Node.js | telegraf | Most projects |
| Node.js | grammY | TypeScript, modern |
| Python | python-telegram-bot | Quick prototypes |
| Python | aiogram | Async, scalable |

### Basic Telegraf Setup

import { Telegraf } from 'telegraf';

const bot = new Telegraf(process.env.BOT_TOKEN);

// Command handlers bot.start((ctx) => ctx.reply('Welcome!')); bot.help((ctx) => ctx.reply('How can I help?'));

// Text handler bot.on('text', (ctx) => { ctx.reply(You said: ${ctx.message.text}); });

// Launch bot.launch();

// Graceful shutdown process.once('SIGINT', () => bot.stop('SIGINT')); process.once('SIGTERM', () => bot.stop('SIGTERM'));


### Project Structure

telegram-bot/ ├── src/ │ ├── bot.js # Bot initialization │ ├── commands/ # Command handlers │ │ ├── start.js │ │ ├── help.js │ │ └── settings.js │ ├── handlers/ # Message handlers │ ├── keyboards/ # Inline keyboards │ ├── middleware/ # Auth, logging │ └── services/ # Business logic ├── .env └── package.json

Inline Keyboards

Interactive button interfaces

When to use: When building interactive bot flows

## Inline Keyboards

### Basic Keyboard

import { Markup } from 'telegraf';

bot.command('menu', (ctx) => { ctx.reply('Choose an option:', Markup.inlineKeyboard([ [Markup.button.callback('Option 1', 'opt_1')], [Markup.button.callback('Option 2', 'opt_2')], [ Markup.button.callback('Yes', 'yes'), Markup.button.callback('No', 'no'), ], ])); });

// Handle button clicks bot.action('opt_1', (ctx) => { ctx.answerCbQuery('You chose Option 1'); ctx.editMessageText('You selected Option 1'); });


### Keyboard Patterns

| Pattern | Use Case |
| --- | --- |
| Single column | Simple menus |
| Multi column | Yes/No, pagination |
| Grid | Category selection |
| URL buttons | Links, payments |

### Pagination

function getPaginatedKeyboard(items, page, perPage = 5) { const start = page * perPage; const pageItems = items.slice(start, start + perPage);

const buttons = pageItems.map(item => [Markup.button.callback(item.name, item_${item.id})] );

const nav = []; if (page > 0) nav.push(Markup.button.callback('◀️', page_${page-1})); if (start + perPage < items.length) nav.push(Markup.button.callback('▶️', page_${page+1}));

return Markup.inlineKeyboard([...buttons, nav]); }

Bot Monetization

Making money from Telegram bots

When to use: When planning bot revenue

## Bot Monetization

### Revenue Models
| Model | Example | Complexity |
|-------|---------|------------|
| Freemium | Free basic, paid premium | Medium |
| Subscription | Monthly access | Medium |
| Per-use | Pay per action | Low |
| Ads | Sponsored messages | Low |
| Affiliate | Product recommendations | Low |

### Telegram Payments

// Create invoice bot.command('buy', (ctx) => { ctx.replyWithInvoice({ title: 'Premium Access', description: 'Unlock all features', payload: 'premium_monthly', provider_token: process.env.PAYMENT_TOKEN, currency: 'USD', prices: [{ label: 'Premium', amount: 999 }], // $9.99 }); });

// Handle successful payment bot.on('successful_payment', (ctx) => { const payment = ctx.message.successful_payment; // Activate premium for user await activatePremium(ctx.from.id); ctx.reply('🎉 Premium activated!'); });


### Freemium Strategy

Free tier:

  • 10 uses per day
  • Basic features
  • Ads shown

Premium ($5/month):

  • Unlimited uses
  • Advanced features
  • No ads
  • Priority support

### Usage Limits

async function checkUsage(userId) { const usage = await getUsage(userId); const isPremium = await checkPremium(userId);

if (!isPremium && usage >= 10) { return { allowed: false, message: 'Daily limit reached. Upgrade?' }; } return { allowed: true }; }

Anti-Patterns

❌ Blocking Operations

Why bad: Telegram has timeout limits. Users think bot is dead. Poor experience. Requests pile up.

Instead: Acknowledge immediately. Process in background. Send update when done. Use typing indicator.

❌ No Error Handling

Why bad: Users get no response. Bot appears broken. Debugging nightmare. Lost trust.

Instead: Global error handler. Graceful error messages. Log errors for debugging. Rate limiting.

❌ Spammy Bot

Why bad: Users block the bot. Telegram may ban. Annoying experience. Low retention.

Instead: Respect user attention. Consolidate messages. Allow notification control. Quality over quantity.

Related Skills

Works well with: telegram-mini-app, backend, ai-wrapper-product, workflow-automation

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

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

平台分布

Local Agent

91.99%
按下载量换算145

安全审计

暂无安全审计结果可展示。

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills