Bots

This page explains the fundamental concept of ''Bots'' within BuilderEngine & Telegram.

Bots

What is a Bot?

In Telegram, bots are small applications that run entirely within the Telegram app. Users interact with bots through flexible interfaces that can support any kind of task or service. The Telegram Bot Platform hosts more than 10 million bots and is free for both users and developers.

In BuilderEngine, a bot is an automated software application that performs tasks over the internet. You can design bots to:

  • Interact with users on messaging platforms (e.g., Telegram).
  • Automate web tasks or workflows.
  • Integrate with various APIs and third-party services.
  • Process data and provide insights.
  • Serve simple web content.

Components of a Bot in BuilderEngine

A typical bot in BuilderEngine consists of several key components that you manage through the Bot Editor:

  • Configuration:
    • Name & Description: Identifiable details for your bot.
    • Token: The primary authentication token required by the platform your bot integrates with (e.g., Telegram Bot Token).
    • API Hash: A unique hash for your bot to interact with BuilderEngine's internal APIs.
  • Files:
    • HTML, CSS, and JavaScript files that define the bot's logic, presentation (if serving web content), or command handlers.
    • Each JavaScript file can have an associated "command" (e.g., /start) that triggers its execution.
  • Database:
    • A simple key-value store for persistent data storage specific to the bot.
  • Secrets:
    • Secure storage for API keys, tokens, and other sensitive credentials your bot might need to interact with external services.
  • Logs:
    • Records of the bot's activity, errors, and informational messages for monitoring and debugging.
  • Users:
    • A list of platform-specific users who have interacted with your bot (e.g., Telegram users).
  • Libraries:
    • Read-only utility files (often JavaScript) provided by the platform that your bot can leverage.

Bot Status

A bot can be in one of several statuses:

  • Online: The bot is running and operational.
  • Offline: The bot is not running.
  • Compiling: The bot's code is currently being compiled or prepared for launch.
  • Error: The bot encountered an error and is not running correctly.

Creating and Managing Bots

You create and manage your bots through the BuilderEngine dashboard and the dedicated Bot Editor. Refer to the Getting Started guide to learn how to create your first bot.