Answer the question
In order to leave comments, you need to log in
How to make it so that the user of the Telegram bot could not get the function (bot) without subscribing to the channel (author)?
How to make it so that the user of the Telegram bot could not get the function (bot) without subscribing to the channel (author)? Namely, so that, when trying to receive a service, the bot would display a message: to receive the service, you must first subscribe to our channel.
Answer the question
In order to leave comments, you need to log in
you need the bot to be in the channel itself, and when the bot writes a command available only to subscribers, it will execute the code:
if bot.get_chat_member('линк или ид канала', message.chat.id) != None:
что он должен сделать на команду
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