Back to Blog
TJS (Telebot Host) TBL Basics

Introduction to TBL Language: Getting Started with TeleBotHost

TBL Language Reference

Introduction

TBL (Tele Bot Lang) is a lightweight scripting language designed specifically for Telegram bot development. It provides a JavaScript-inspired syntax with built-in functions for rapid bot creation, without the overhead of external dependencies.

Key Features

  • Simplified command-based structure
  • Predefined variables for user, chat, and message context
  • Built-in API methods for sending messages, keyboards, and inline responses
  • Support for HTTP requests, global variables, and modular extensions
  • Support both synchronous and asynchronous execution, with 80% sync and 20% async behavior where await, Promise are valid

Getting Started

Step 1: Create a Telegram Bot

  • Open Telegram and search for @BotFather
  • Send /newbot to create a new bot
  • Choose a name and a username (must end with bot)
  • Copy the generated bot token
JAVASCRIPT
const botToken = "123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ";

Step 2: Register on TBL Platform

  • Log into the TBL platform
  • Click 'Create New Bot'
  • Enter the bot name and paste the token from BotFather
  • Click 'Create' to initialize your bot

Step 3: Add Basic Commands

Create a /start command for user onboarding:

JAVASCRIPT
Bot.sendMessage("Hello " + user.first_name + "! Welcome to my bot.")

Example /help command:

JAVASCRIPT
Bot.sendMessage("Available commands:\n/start - Start bot\n/help - Show help")

📚 Source

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

Share this tutorial