Is it possible to find out if the bot has

permission to send messages to the user? for example, when user opens webapp

6 ответов

15 просмотров

i don't think so

try catch?

ЅуѕWΟW64
try catch?

that, or just log every first /start a user sends

Ruslan-mikhylichenko Автор вопроса
ЅуѕWΟW64
try catch?

the problem is when user open's webapp from direct link user can uncheck "i allow bot to send messages to me". I need to check directly in my webapp did user uncheck this or not, if yes then i should show him message like "allow bot to send messages" otherwise everything is fine and he can use webapp correctly

Ruslan mikhylichenko
the problem is when user open's webapp from direct...

maybe display an alert showing that please make sure to enable this so and so option... for best experience or something 👾

Ruslan-mikhylichenko Автор вопроса

oh i found it, there is param "allows_write_to_pm" inside initDataUnsafe.user Might be useful for someone

Похожие вопросы

Карта сайта