uncpfiae, const { Telegraf } = require('telegraf'); const bot = new Telegraf('токен') bot.use(async (ctx) => { await ctx.reply(JSON.stringify(ctx.update, null, 2)); }); bot.launch().then(() => console.log('Started')); process.once('SIGINT', () => bot.stop('SIGINT')); process.once('SIGTERM', () => bot.stop('SIGTERM')); Код const { Telegraf } = require('telegraf'); const bot = new Telegraf('токен') bot.use(async (ctx) => { await ctx.reply(JSON.stringify(ctx.update, null, 2)); }); bot.launch().then(() => console.log('Started')); process.once('SIGINT', () => bot.stop('SIGINT')); process.once('SIGTERM', () => bot.stop('SIGTERM'));
Hollywood, уже было несколько советов от пользователей. Дай какую-то обратную связь, чтобы знающим было понятно решена проблема или нет.