Answer the question
In order to leave comments, you need to log in
Programming Telegram Bota, why doesn't Node JS code work?
I'm a beginner, I'm taking the course "Telegram-bot Master", at the time of recording the code is working, but now I can't understand what's the matter that it's not working now, here's the code:
const TelegramBot = require('node-telegram-bot-api')
const TOKEN = 'ЗДЕСЬ МОЙ ТОКЕН'
const bot = new TelegramBot(TOKEN,{
polling: {
interval: 300,
autoStart: true,
params:{
timeout: 10
}
}
})
bot.on('message', msg => {
bot.sendMessage(msg.chat.id, 'I am alive!')
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question