A
A
antihrust2020-02-03 19:20:24
Python
antihrust, 2020-02-03 19:20:24

How to send messages asynchronously?

I would like to understand how it is possible and necessary to send messages asynchronously with the telebot and asyncio libraries. How to add async to this code?

def test(message):
    bot.send_chat_action(i, 'upload_photo')
    bot.send_photo(i, photo=open('/home/pi/Desktop/bot2.0/photo/11/image.jpg', 'rb'))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alfss, 2020-02-03
@alfss

https://github.com/eternnoir/pyTelegramBotAPI#asyn...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question