Answer the question
In order to leave comments, you need to log in
Random pictures for telegram bot?
Recently got acquainted with telebot for python. I learned that with the help of bot.send_photo, you can throw pictures to the user. The question is what ideas for a competent random generator of certain pictures? Do not make a random function and write bot.send_photo there 1000 times.
Answer the question
In order to leave comments, you need to log in
You can create a list with links to pictures, use the random.choice( <list> ) function. When necessary, you can cut the first link, then the pictures will not be repeated
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question