Answer the question
In order to leave comments, you need to log in
The bot asks to subscribe to a specific channel, how to check if there was a subscription?
The bot asks to subscribe to the channel, how to check if there was a subscription?
Hence, there are two options for action, if there is a subscription, if it is not.
And, accordingly, checking for a subscription, so as not to ask again.
I am using pyTeleBotApi.
Answer the question
In order to leave comments, you need to log in
oh, I figured it out
the easiest way is to check the status
statuss = ['creator', 'administrator', 'member']
for chri in statuss:
if chri == bot.get_chat_member(chat_id=my_channel_id, user_id=message.from_user.id).status:
bot.send_message(message.chat.id, 'Начнем!')
break
# text_ha(message)
text_handler(message)
else:
bot.send_message(message.chat.id, 'Подпишитесь на канал @КАНАЛ ')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question