M
M
Mikhail Muntyan2022-02-12 16:21:22
Bots
Mikhail Muntyan, 2022-02-12 16:21:22

How to check whether it is possible to send a message to a user using the Telegram Api or the pyTelegramBotApi library?

I am writing a bot in python + pyTelegramBotApi, when I send a message to a user (without pressing start), I get the error: "bot can't initiate conversation with a user". I want to know if it is possible to find out with the help of api or a library whether the user has pressed the start button, whether the user has added a bot to
an emergency. I don't want to resort to exceptions.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question