Creating Your First Bot

This guide will walk you through the process of creating your very first bot using BuilderEngine. We'll cover the essential steps from setup to seeing your bot online.

Prerequisites

  • A BuilderEngine account. If you don't have one, please Sign Up.
  • A token for the platform you want your bot to integrate with Telegram Bot.

Steps

1. Navigate to Your Dashboard

After logging into BuilderEngine, you'll land on your dashboard. This is where you can see all your existing bots and create new ones.

2. Initiate Bot Creation

  • Click the prominent "Create New Bot" button.
  • You'll be taken to a simple form asking for initial bot details.

3. Provide Basic Bot Information

  • Bot Name: Choose a descriptive name for your bot. This is how you'll identify it in your dashboard.
  • Bot Token: This is a compulsory field. Enter the API token provided by the messaging platform your bot will use (e.g., Telegram, Discord).
    • Why is this compulsory? The token is essential for BuilderEngine to authenticate and communicate with the respective platform on behalf of your bot.
    • For testing purposes you can enter some random text.
  • Description (Optional): Add a short description of what your bot does. This is helpful for your own reference.

Click "Create Bot & Continue to Editor".

4. Explore the Bot Editor

You'll now be in the Bot Editor for your newly created bot. This is where you'll define its functionality. Key areas include:

  • Configuration: Review and update your bot's name, description, and token. You'll also see a view-only API Hash generated by BuilderEngine for internal use.
  • Files: This is where you'll add your HTML, CSS, and JavaScript files to make your bot do things.
  • AI Bot Builder: Get assistance from an AI to write code or configure your bot.
  • Database: A key-value store if your bot needs to remember information.
  • Secrets: Securely store any other API keys or sensitive data your bot might need.
  • Logs: Monitor your bot's activity.

5. Create a Simple "Hello World" Bot

Let's create a basic command.

  • Go to the Files tab.

  • File Name: Enter abc.js

  • Command: Enter *

  • Click "Add File".

  • The abc.js file will be selected, and the editor will appear.

  • Enter the following JavaScript code:

  • Click "Save".

6. Launch Your Bot

  • Navigate to the Configuration tab in the Bot Editor.
  • Under "Bot Controls", click the "Launch" button.
  • Make sure to use a active bot token from telegram.
  • The bot's status should change from "offline" to "compiling" and then to "online".

7. Test Your Bot

How you test depends on the platform:

  • Telegram: Go to your Telegram app, find your bot (using the username you set up when getting the token), and send any message.

Next Steps

Congratulations! You've created and launched a basic bot. From here, you can:

  • Explore adding HTML and CSS files if your bot needs a web interface.
  • Learn about using the Database and Secrets management.
  • Dive deeper into writing more complex JavaScript logic for your bot's commands.

Refer to other sections in this documentation for more detailed guides and API references.