Answer the question
In order to leave comments, you need to log in
How to make a bot poll in telegram?
The task is to write a bot that will ask questions, thereby writing the answers to a variable and send them to the channel at the end.
I write on telegraf framework
var name, age
function askName(c){
c.reply('Введите имя')
bot.on('text', (c)=>{
name = c.message.text
if(name){
function(askAge)
}
})
}
function askAge(c){
c.reply('Введите год')
bot.on('text', (c)=>{
age = c.message.text
})
}
function askName(ctx)
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