Back to Blog
TPY (Telebot Creator) TPY Basics

Getting Started with TPY Commands: Your First Telebot Creator Bot

What Are TPY Commands?

TPY (Telebot Python) commands are the fundamental building blocks of every bot created on Telebot Creator. When a user sends a specific keyword or message to your bot, like /start or /help, it triggers a corresponding TPY command that determines how your bot responds.

Your First TPY Command

The simplest TPY command is the /start command, which welcomes users when they first interact with your bot. Here's how it looks:

PYTHON
bot.sendMessage("👋 Welcome to My First Bot!\n\nThis bot is powered by Telebot Creator.\nUse /help to see available commands.")

How Commands Work

When a user sends a message to your bot, Telebot Creator checks if the message matches any of your defined commands. If a match is found, the corresponding TPY code executes and sends a response back to the user.

Important Note

Command names are case-insensitive by default. /START, /start, and /Start will all trigger the same command.

Command Structure

Every TPY command follows a simple structure. The code inside the command executes sequentially, and you can use multiple lines of code to create complex responses:

PYTHON
// Store user information
User.setProperty("first_visit", Date.now());

// Send welcome message
bot.sendMessage("Welcome! I've recorded your first visit.");

// Show available options
var keyboard = [[{text: "📚 Tutorials", callback_data: "tutorials"}]];
bot.sendInlineKeyboard(keyboard, "What would you like to learn?");

Command Types Overview

  • Basic Response Commands - Simple text replies
  • Interactive Commands - Messages with buttons and menus
  • Data Processing Commands - Handle user input and store information
  • API Integration Commands - Connect with external services
  • Scheduled Commands - Automated tasks and reminders
  • Multi-step Commands - Guide users through complex workflows

Learn More

For complete documentation and advanced tutorials, visit the official Telebot Creator help site:

🔗 https://help.telebotcreator.com/ - Official documentation, guides, and API reference.

The documentation covers:

  • Complete TPY language reference
  • Advanced command examples
  • Payment integration guides
  • Blockchain and crypto tutorials
  • Best practices and optimization tips
  • Troubleshooting common issues

Remember

Each command execution costs 1 point from your monthly 100,000 point allocation. Design your commands efficiently to maximize your bot's capabilities.

📚 Source

This tutorial is based on the official Telebot Creator Documentation. Visit their site for the most up-to-date information and advanced guides.

Share this tutorial