Answer the question
In order to leave comments, you need to log in
How to make a link to a private channel so that it is displayed as a button in a Telegram bot?
We have a working bot, we want to identify users and, after successful completion, send a link to a private channel in a hidden form so that users cannot send it to each other.
As I understand it, this can be done by hiding the link in the bot's response inside the button, after clicking, the channel preview pops up.
Can you help me with what method to wrap the link in order to implement such functionality? Thank you)
Answer the question
In order to leave comments, you need to log in
Like a switch button, as described here Only with a transition to the channel and without inline bot mode enabled
def send_responsible(tlgrm_id_responsible, title, director, d_line, id_task, t_url):
msg = {'chat_id': tlgrm_id_responsible,
'text': ' ' + title + '\n\n' + '✍ ' + director + '\n' + '⏰ ' + d_line + '\n' + ' '
+ '[Задача № ' + id_task + ']' + '(' + t_url + ')', 'parse_mode': 'Markdown'}
requests.post(const.tlgrm_url, data=msg, proxies=const.proxy)
<a href="URL">...</a>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question