How It Works
How NxCreator runs your code, updates the bot runtime, and exposes built-in utilities.
Runtime model
Each bot runs in an isolated Node.js execution context managed by NxCreator. Your sections are evaluated into a single bot runtime, and the platform keeps the Telegram integration layer connected for you.
NxCreator runs Telegraf under the hood, but it is not a bare Telegraf setup. The distinction matters: use the built-in globals and platform patterns rather than recreating your own app bootstrap. The platform already handles connection, polling, and process management — your code only needs to describe what the bot should do.
Save cycle
When you save code, NxCreator updates the running bot definition without making you manage a separate deployment pipeline. In practice, that means faster testing: edit a handler, save, then verify the result immediately in Telegram.
Web requests
Use the global axios instance for HTTP requests. This is the standard way to call external APIs from a bot command or scene.
Timers & utilities
Standard timer functions such as setTimeout() and setInterval() can be used for reminders and recurring tasks inside the bot runtime.
Utility modules such as crypto are also useful for app-specific logic, but keep long-running interval logic disciplined so it does not turn into unmanaged background behavior.