Request for support for Polls
Source: https://core.telegram.org/bots/api#april-14-2019
Todo
sendPoll methodstopPoll methodpoll fieldI think this update should include all the updates reported in Telegram bot blog: https://core.telegram.org/bots/api-changelog#april-14-2019
@alexandercerutti The only thing missing function is the pools. The rest of the improvements are server-side and they work perfectly with the current library
Example:
msg.forward_sender_name // Return name of the user if user have forward restrictions active
@danielperez9430 oh okay, so nvm. 馃槉
The main features are ready. Just need to add the tests. Alternatively, if there is high demand for the features before the tests are written, I will merge the changes.
@kamikazechaser WoW, good work mate. It's possible to use it, now?
Update: I tried to download the changes and paste them into the Node_Modules folder and works
Does the code in the master branch already work for Polls 2.0? https://telegram.org/blog/polls-2-0-vmq
Thank you
Yes, it should work, just pass type as an optional parameter.
Hi, please can me send the correct sintaxt to use in a node js telegram bot?
I don' find how to use... I need to create quiz and polls.
Hi, please can me send the correct sintaxt to use in a node js telegram bot?
I don' find how to use... I need to create quiz and polls.
Check this examples mate:
https://tecnonucleous.com/2020/02/13/como-enviar-encuestas-2-0-con-nuetro-bot-de-telegram/
Hi, please can me send the correct sintaxt to use in a node js telegram bot?
I don' find how to use... I need to create quiz and polls.Check this examples mate:
https://tecnonucleous.com/2020/02/13/como-enviar-encuestas-2-0-con-nuetro-bot-de-telegram/
bot.onText(/^!encuesta|^\/encuesta/,
There is a way to use a variable in object of poll? Same as "encuesta + variabletext"?
Hi, please can me send the correct sintaxt to use in a node js telegram bot?
I don' find how to use... I need to create quiz and polls.Check this examples mate:
https://tecnonucleous.com/2020/02/13/como-enviar-encuestas-2-0-con-nuetro-bot-de-telegram/bot.onText(/^!encuesta|^/encuesta/,
There is a way to use a variable in object of poll? Same as "encuesta + variabletext"?
You can match text before the command, like this example:
// Matches "/echo [whatever]"
bot.onText(/\/echo (.+)/, (msg, match) => {
// 'msg' is the received Message from Telegram
// 'match' is the result of executing the regexp above on the text content
// of the message
const chatId = msg.chat.id;
const resp = match[1]; // the captured "whatever"
// More...
});
Wow! so can we create the polls now? via this npm module?
Please guide me to the documentation link and/or code samples. thank you
Most helpful comment
The main features are ready. Just need to add the tests. Alternatively, if there is high demand for the features before the tests are written, I will merge the changes.