'how to echo a poll/survey
So I want that when you send my bot a poll that he creats a copy of that and send it to you (not forward). But I dont know how to analyse a recived poll.
I know you can build a poll by command:
@bot.message_handler(commands=["poll"])
def start(message):
bot.send_poll(-10000000000,'choose one',['a','b','c'])
I also tried using the echo from example but it didnt work:
@bot.message_handler(func=lambda m: True)
def echo_poll(message):
bot.send_poll(message, message.text)
anyone could help me with that?
Solution 1:[1]
Resolved. I was not returning a user from my DB. From the code above:
...function(accessToken, refreshToken, profile, done) {
// asynchronous verification, for effect...
process.nextTick(function () {
//code below was not present when I was getting the error:
User.findOrCreate({ linkedInId: profile.id}, function(err, user) {
if (err) { return done(err); }
done(null, user);
});
});
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Fiattarone |
