Quick Start

Create a Python bot and send your first reply.

1 — Create a bot

Open Telegram, message @BotFather, and run /newbot. Choose a bot name and username, then copy the bot token.

2 — Connect it to NxCreator

Open your NxCreator dashboard, choose Add Bot, pick Python, and paste the token. This creates the project and connects the Python runtime.

Keep the bot token private.

3 — Write your first command

In NxCreator, each Python command is a separate handler with a trigger (command, text, callback, regex or any). The code you write is the body of that command. Use u for the chat id and text for the incoming text.

# Command: /start
bot.replyText(u, "Hello " + (user.get("first_name") or ""))

# Command: any text (trigger type "any" or "*")
bot.replyText(u, "You said: " + text)

Call another command with Bot.runCommand("helper", options="opt1"), and chain input with Bot.handleNextCommand("age").

4 — Test it

Save the code, open the bot chat in Telegram, and send /start. Then send a regular message to confirm your handler works.

PREVIOUS
Python Bots
NEXT
Overview
Was this page helpful?
Last updated March 22, 2026