I want my telegram bot written on Python using pyTelegramBotAPI to send a picture on command /photo If i try this code I will recive photo just once, no matter how many times I trigger ths command
photo = open('all_path/sudoku_1.png', 'rb')
@bot.message_handler(commands=['photo'])
def send_photo(message):
bot.send_photo(message.chat.id,photo)
To receive it once more I have to restart the bot or do like that
@bot.message_handler(commands=['photo'])
def send_photo(message):
bot.send_photo(message.chat.id, open('all_path/sudoku_1.png', 'rb'))
This is uncomfortable, can I do something else? And I'm new to Python and don't know much yet Help please