Hi guys, I am trying to build a Telegram bot plugin that allows users to send polls via their app. However, one of my troubles is that Telegram allows 2-10 options to be filled for their polls. I want to allow my app users to specify how many options they want and combine all their options into one parameter for my plugin.
I would need something in the form of [“option 1”, “option 2”, “option 3”] to be collected and passed as a parameter but if he only selects 2, then I will take in [“option 1”, “option 2”]
Currently I am using something like this:
which hard caps the users to fill in 5 options. I wish to have something a little more dynamic like
But the trouble is I don’t know how I can dynamically add on to a single string of words. I am currently doing this
but as mentioned, I am hard capping this at 5 options. I wish to know how I can go about passing in a dynamic string based on the number that has been selected. i.e. If a user selects that he wants 7 options, I take in 7 options and combine it in the form [“option 1”, “option 2”, … , “option 7”]