0

I am trying to send a text message to telegram using python. Text message is basically a Windows command:

mstsc.exe /v:10.20.30.40

I want this text to act a one-click openable text from telegram. Is this possible?

I tried and it is appearing as a broken link. Example given below.

Issue Screenshot

0stone0
  • 34,288
  • 4
  • 39
  • 64
Whity
  • 1
  • 2
  • `one-click openable text from telegram` what do you mean by this? – 0stone0 Dec 03 '22 at 18:18
  • If you noticed the link doesn't take the whole command as such and on the click takes only the IP address. I want the link to consider the whole command "mstsc.exe /v:10.20.30.40" so with one click, the command can be executed in Windows. – Whity Dec 04 '22 at 19:11

1 Answers1

1

No, this is not possible, Telegram Bot API only support a small set of urls, like t.me and the normal http(s)://, any custom format can't be passed a clickable link.

Source: (Still) Can't find any source in the Telegram docs, however, I've asked this a few months ago to the Telegram Bot Support, I wanted to send a clickable tel: link, they replied with:

Hi, at the moment only http/https links will be supported.


The closest you can come to mimic this, is by using backticks to make it copy to your clipboard when you press it:

How to make that when you click on the text it was copied pytelegrambotapi

0stone0
  • 34,288
  • 4
  • 39
  • 64