ошибка triggerUncaughtException node js telegram-api
node:internal/process/promises:246 triggerUncaughtException(err, true /* fromPromise */); ^
const TelegramApi = require('node-telegram-bot-api')
const bot = new TelegramApi(token, {polling:true})
const chats = {}
const start = async () => {
bot.setMyCommands([
{command: '/start', description: 'Начальное приветствие'},
{command: '/pay', description: 'Купить ключ'},
{command: '/game', description: 'Игра угадай цифру'}
])
}
bot.on('message', async msg => {
const text = msg.text
const chatId = msg.chatId
if(text === "/start") {
await bot.sendMessage(chatId, `123 ${text}`)
}
})

