Answer the question
In order to leave comments, you need to log in
Polling:true disabled in Telegram Api?
Greetings, I can't figure out why polling:true doesn't work.
already trimmed the code (for testing) and still doesn't work:
require('dotenv').config('')
const token = process.env.TOKEN || тут указан токен но вам оно не надо
const uri = process.env.URI;
const TelegramApi = require('node-telegram-bot-api');
const bot = new TelegramApi(token, { polling: true });
const keyboardOption ={
reply_markup: {
inline_keyboard:
[
[
{ text: "Да", callback_data: '1' },
{ text: "Нет", callback_data: '0' }
]
]
}
}
bot.on("message", async (msg, prop) => {
bot.sendMessage (msg.from.id, 'blablabla', keyboardOption);}
bot.on("callback_query", msg=>console.log(msg));
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