NxCreateDocs

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.

The legacy docs emphasized that NxCreator is close to standard Telegraf, but not identical. That distinction matters: use the built-in globals and platform patterns instead of trying to recreate your own app bootstrap logic.

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.

bot.command('news', async (ctx) => {
  try {
    const response = await axios.get('https://api.example.com/news');
    await ctx.reply('Latest news: ' + response.data.headline);
  } catch (err) {
    console.error('API request failed:', err);
    await ctx.reply('Failed to fetch news.');
  }
});

Timers & utilities

Standard timer functions such as setTimeout() and setInterval() can be used for reminders and recurring tasks inside the bot runtime.

bot.command('remindme', async (ctx) => {
  await ctx.reply('I will remind you in 5 seconds...');

  setTimeout(() => {
    ctx.reply('Reminder: 5 seconds passed!');
  }, 5000);
});

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.

How did this page feel?

Quick feedback helps improve the docs.

Last updated March 22, 2026
NxCreator, Inc.
Build and operate Telegram bots with a managed runtime.