Main Documentation: https://core.telegram.org/bots/api Description: Complete reference documentation for the Telegram Bot API
Core Features:
Main Documentation: https://core.telegram.org/bots/webapps Full Platform: https://docs.telegram-mini-apps.com Description: Development documentation for Telegram Mini Apps
Core Features:
Main Documentation: https://core.telegram.org Description: Complete Telegram protocol and client development
Core Features:
Repository: https://github.com/tdlib/telegram-bot-api Description: Implementation of the Telegram Bot API server Features:
Repository: https://github.com/DrKLO/Telegram Description: Source code for the official Android client Features:
Repository: https://github.com/telegramdesktop/tdesktop Description: Official desktop client (Windows, macOS, Linux) Features:
Organization Page: https://github.com/orgs/TelegramOfficial/repositories Includes:
getUpdates - Long pollingsetWebhook - Set a webhookdeleteWebhook - Delete a webhookgetWebhookInfo - Webhook informationSending Messages:
sendMessage - Text messagesendPhoto - PhotosendVideo - VideosendDocument - DocumentsendAudio - AudiosendVoice - VoicesendLocation - LocationsendVenue - VenuesendContact - ContactsendPoll - PollsendDice - Dice/DartsEditing Messages:
editMessageText - Edit texteditMessageCaption - Edit captioneditMessageMedia - Edit mediaeditMessageReplyMarkup - Edit keyboarddeleteMessage - Delete a messageOther Operations:
forwardMessage - Forward a messagecopyMessage - Copy a messagesendChatAction - Send an action (typing...)getFile - Get file informationhttps://api.telegram.org/file/bot<token>/<file_path>answerInlineQuery - Respond to an inline queryanswerCallbackQuery - Respond to a button clicksendInvoice - Send an invoiceanswerPreCheckoutQuery - Pre-checkoutanswerShippingQuery - Shipping querysendGame - Send a gamesetGameScore - Set a scoregetGameHighScores - Get high scoreskickChatMember / unbanChatMember - Ban/unbanrestrictChatMember - Restrict permissionspromoteChatMember - Promote to adminsetChatTitle / setChatDescription - Set chat infosetChatPhoto - Set chat photopinChatMessage / unpinChatMessage - Pin/unpin a messageconst tg = window.Telegram.WebApp;
tg.ready();
tg.expand();
40+ events including:
themeChanged - Theme changedviewportChanged - Viewport changedmainButtonClicked - Main button clickedbackButtonClicked - Back button clickedsettingsButtonClicked - Settings button clickedinvoiceClosed - Payment completedpopupClosed - Popup closedqrTextReceived - QR code scan resultclipboardTextReceived - Clipboard textwriteAccessRequested - Write access requestedcontactRequested - Contact requestedtg.themeParams = {
bg_color, // Background color
text_color, // Text color
hint_color, // Hint color
link_color, // Link color
button_color, // Button color
button_text_color, // Button text color
secondary_bg_color, // Secondary background color
header_bg_color, // Header background color
accent_text_color, // Accent text color
section_bg_color, // Section background color
section_header_text_color, // Section header text color
subtitle_text_color, // Subtitle color
destructive_text_color // Destructive action color
}
The core tool for creating and managing Bots:
Bot Management:
/newbot - Create a new Bot/mybots - Manage my Bots/deletebot - Delete a Bot/token - Regenerate a tokenSettings Commands:
/setname - Set name/setdescription - Set description/setabouttext - Set about text/setuserpic - Set user pictureFeature Configuration:
/setcommands - Set command list/setinline - Enable inline mode/setinlinefeedback - Inline feedback/setjoingroups - Allow joining groups/setprivacy - Privacy modePayments and Games:
/setgamescores - Game scores/setpayments - Configure paymentsMini Apps:
/newapp - Create a Mini App/myapps - Manage Mini Apps/setmenubutton - Set menu buttonVisit https://my.telegram.org
pip install python-telegram-bot
Features:
Basic Example:
from telegram import Update
from telegram.ext import Application, CommandHandler, ContextTypes
async def start(update: Update, context: ContextTypes.DEFAULT_TYPE):
await update.message.reply_text('Hello!')
app = Application.builder().token("TOKEN").build()
app.add_handler(CommandHandler("start", start))
app.run_polling()
pip install aiogram
Features:
MTProto client libraries:
pip install telethon
pip install pyrogram
Uses:
npm install node-telegram-bot-api
npm install telegraf
Features:
npm install grammy
Features:
Recommended Platforms:
Requirements:
Recommended Platforms:
Advantages:
Token Security
Data Validation
Permission Control
Rate Limiting
import logging
logging.basicConfig(level=logging.DEBUG)
// Enable debug mode
tg.showAlert(JSON.stringify(tg.initDataUnsafe, null, 2));
// Console logs
console.log('WebApp version:', tg.version);
console.log('Platform:', tg.platform);
console.log('Theme:', tg.colorScheme);
Use ngrok for local testing:
ngrok http 5000
# Set the generated https URL as the webhook
Latest Features:
File: Telegram_Bot_button_and_keyboard_implementation_template.md
Lines: 404
Size: 12 KB
Language: Chinese
A concise and practical guide to implementing interactive features for Telegram Bots:
Core Content:
Features:
File: dynamic-view-alignment-implementation-document.md
Lines: 407
Size: 12 KB
A professional solution for monospaced font data alignment and formatting:
Core Features:
Use Cases:
Technical Features:
Visual Effect Example:
1. BTC $1.23B $45,000 +5.23%
2. ETH $890.5M $2,500 +3.12%
3. SOL $567.8M $101 +8.45%
These templates provide a complete solution for Telegram Bot development, from basic to production level!