Skip to content
Advertisement

How to iterate over a range and then append items from list to it?

Right now the for loop that adds reactions at the end of the message takes number_of_responses, which is what I want. But I would also like the e.add_field fields be added based on number_of_responses (along with the right emoji in the name field and then add items from the list answers to their values).

JavaScript

Advertisement

Answer

No need to loop over indices. Just zip the answers and the emoji_numbers:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement