Poll and options (anonymous) #346
-
If I understand this(https://flows.nodered.org/node/node-red-contrib-telegrambot) correctly, the method: poll should receive an object with question and options as answer choices in msg.payload.content, and msg.payload.options should include additional options such as is_anonymous: false. Like so:
However, it seems that this is not the case. I get the response: "expected an Array of String as options." How can I send a non-anonymous poll? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I just copied this from the readme msg.payload.type = 'poll'; |
Beta Was this translation helpful? Give feedback.
I just copied this from the readme
msg.payload.type = 'poll';
msg.payload.content = "What do you think?";
msg.payload.options = ["A", "B", "C" ];
// you can add optional parameters see https://core.telegram.org/bots/api#sendpoll
msg.payload.optional = { allows_multiple_answers : true };
return msg;