Understanding the Bot Editor
The BuilderEngine Bot Editor is your primary interface for configuring, coding, and managing individual bots. This guide provides an overview of its main sections and functionalities.
Accessing the Bot Editor
You can access the Bot Editor in two ways:
- After Creating a New Bot: You are automatically redirected here.
- From the Dashboard: Click the "Manage Bot" button on any bot card in your list of bots.
Main Tabs
The Bot Editor is organized into several tabs for clarity:
1. Configuration
This is where you manage the core settings of your bot.
- Bot Name: The display name of your bot.
- Description: A brief description of your bot's purpose.
- Bot Token: The primary API token from the platform your bot integrates with (e.g., Telegram Bot Token).
- API Hash (View Only): A unique hash generated by BuilderEngine, used for internal API interactions. You cannot edit this, but you can revoke it to generate a new one if needed.
- Bot Controls:
- Launch: Starts your bot.
- Stop: Stops your bot.
- Go to Bot (Conditional): If your bot has a direct platform link, this button will appear to take you there.
- Delete Bot: Permanently removes your bot and all its associated data. This action requires confirmation.
- Save Configuration: Click this to save any changes made to the name, description, or token.
2. Files
This tab is for managing the code that powers your bot.
- File Manager:
- Add New File: Create HTML, CSS, or JavaScript files.
- File Name: Must include a valid extension (
.html,.css,.js). - Command (for .js files only): A required field for JavaScript files. This is the command (e.g.,
/start) that will trigger this script when received by the bot.
- File Name: Must include a valid extension (
- File List: Shows all your bot's files. Click a file to open it in the editor. You can also delete files from here.
- Add New File: Create HTML, CSS, or JavaScript files.
- Code Editor:
- Appears when a file is selected.
- Provides syntax highlighting for HTML, CSS, and JavaScript.
- Format Code: Uses Prettier to automatically format the code in the editor.
- Save: Saves the current content of the selected file. The button is disabled if no changes have been made.
- Displays file language, last modified date, and command (if applicable).
- All your code will run for upto 6 second and it will be forced to hard kill after that.
- Upgrade your plan to acces for network and storage access.
3. AI Bot Builder
An interactive chat interface to help you build your bot.
- Chat Pane: Displays your conversation with the AI assistant. Messages are scrollable.
- Input Area: Type your requests or questions for the AI.
- Tokens Left: Shows an estimate of your remaining AI interaction tokens for the current cycle (if applicable to your plan).
- The AI can help with:
- Generating code snippets or full bot codes.
- Explaining concepts.
- Suggesting configurations.
- Modifying files on your behalf (it will describe the changes it plans to make).
4. Libraries
View read-only utility files provided by the BuilderEngine platform.
- Library File List: Click a file to view its content.
- Viewer: Displays the content of the selected library file with syntax highlighting. You cannot edit these files.
5. Users
Lists users who have interacted with your bot on its platform.
- Displays user's avatar (initials), full name (if available), username, and platform ID.
- This list is typically populated by the backend as users interact with your live bot.
6. Database
A simple key-value store for your bot's persistent data.
- Add/Update Item:
- Key: The unique identifier for your data entry. Cannot be changed once an item is created.
- Value: The data you want to store (can be a string, number, JSON string, etc.).
- Click "Add Item" to create a new entry or "Update Value" if you've selected an existing item to edit.
- Stored Items: Lists all existing key-value pairs. You can edit the value or delete items.
7. Secrets
Securely manage sensitive information like API keys or tokens that your bot needs.
- Add/Update Secret:
- Secret Key: The name of your secret (e.g.,
STRIPE_API_KEY). Cannot be changed once created. - Secret Value: The actual secret data. This is stored securely by the backend.
- Click "Add Secret" or "Update Value".
- Secret Key: The name of your secret (e.g.,
- Stored Secrets: Lists your secrets.
- Values are masked by default. Click the "eye" icon to reveal/hide the value.
- You can edit the value or delete secrets.
8. Logs
View real-time and historical logs generated by your bot.
- Log Viewer: Displays log messages, including their type (info, critical, normal).
INFOmessages are often highlighted (e.g., yellow).ERRORmessages are highlighted (e.g., red).NORMALmessages are standard text.
- Refresh Logs: Manually fetches the latest logs auto logs are not updated in live tail.
General Tips
- Save Frequently: Always save your file changes and configuration updates.
- Export Backup: Keep a piece of bot codes in backup.
- Check Logs: When troubleshooting, the Logs tab is your best friend.
- Use AI Builder: Don't hesitate to ask the AI for help if you're stuck or need ideas.
This overview should help you navigate and utilize the Bot Editor effectively. Happy building!