Chuyển đến nội dung
Skillpedia
API và máy chủ (backend)48k · #5950

telegram-bot-builder

Skill này làm gì

Chuyên gia này giúp bạn xây dựng bot cho ứng dụng Telegram. Nó hướng dẫn cách làm bot đơn giản để tự động hóa tác vụ hoặc bot AI phức tạp hơn, từ cấu trúc đến cách kiếm tiền từ bot.

Khi nào nên dùng

  • ✓Khi bạn muốn tạo bot để tự động hóa các tác vụ lặp lại.
  • ✓Khi bạn có ý tưởng bot Telegram nhưng chưa biết bắt đầu từ đâu.
  • ✓Khi bạn muốn học cách kiếm tiền từ bot Telegram.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/telegram-bot-builder/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/telegram-bot-builder/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tôi muốn tạo một bot Telegram gửi nhắc nhở hằng ngày cho bạn bè. Tôi nên làm thế nào?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Chuyên gia hướng dẫn cấu trúc của bot, dạy cách dùng Telegram API chính thức và cách giúp người dùng tương tác dễ dàng. Nó cũng giải thích cách kiếm tiền và mở rộng bot cho nhiều người dùng.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Telegram Bot Builder

Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users.

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.

Expertise

  • Telegram Bot API
  • Bot UX design
  • Monetization
  • Node.js/Python bots
  • Webhook architecture
  • Inline keyboards

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

…
Câu hỏi thường gặp

Telegram Bot API là gì?

Đó là bộ quy tắc và công cụ mà Telegram cung cấp để lập trình viên tạo bot riêng.

“Inline Keyboards” là gì?

Đây là các nút tương tác hiển thị trực tiếp trong cuộc trò chuyện Telegram, giúp tương tác với bot dễ dàng và trực quan hơn.

Bot có thể kiếm tiền bằng cách nào?

Có nhiều cách, như cung cấp tính năng nâng cao trả phí (freemium), đăng ký hàng tháng, tính phí theo lần dùng, hiển thị quảng cáo hoặc giới thiệu sản phẩm của bên thứ ba.

Chi tiết

Mô tả gốc của tác giả

Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#5950
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự