Discussion of article "How to create bots for Telegram in MQL5" - page 54

 
Maksym Mudrakov #:

I've tried writing "<br/>" in the body of the message and also substituting angle brackets and getting"&lt;br/&gt;" but it doesn't work

I'm away from ps now, as I remember I downloaded the old version of web telegram and saw what was in the browser bar.
 
Maksym Mudrakov #:

It's not working for me.

That's the only thing that works for me, no other transpositions.

  string text="MQLInfoString(MQL_PROGRAM_NAME)+"%0A"+
              "(string)AccountInfoInteger(ACCOUNT_LOGIN)+"%0A"+
              txt;
Init("POST","/bot"+Token+"/sendMessage?chat_id="+chat_ID,Head,"&parse_mode=HTML&text="+text);
 

It's working for me.

"<u>underlined</u>\n"
"<b>bold</b>\n"
"<i>italic</i>\n"
"<s>strikethrough</s>\n"
"<a href=\"http://www.example.com/\">URL</a>\n"
"<code>inline fixed-width code</code>\n"
"<pre>pre-formatted monospace</pre></font>\n"
"<pre><code class=\"language-MQL5\">pre-formatted fixed-width code block written in the MQL5 programming language</code></pre>\n"
"<blockquote>Block quotation started\nBlock quotation continued\nThe last line of the block quotation</blockquote>"
"<tg-spoiler>spoiler</tg-spoiler>\n"
 
Edgar Akhmadeev #:

It's working for me.

screenshot

 

Can you tell me how to remove the site preview from the link in telegram, is it possible to disable this function when sending a message?

 
Fokus24 sending a message?

I don't think so. I haven't found it in the old API for sure.

 
Fokus24 sending a message?

Look at link_preview_options in https://core.telegram.org/bots/api#sendmessage

Telegram Bot API
  • core.telegram.org
The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram. To learn how to create…
 
AmirKian2341 # :
Hello to all dear friends
I'm using Telegram.mqh in Expert to communicate with Telegram but I'm having problems

1- I cannot read the last message sent to the Telegram channel from Expert

2- I can read messages sent by users in the group, but I cannot read messages sent by other Telegram bots .  

Please help me with any problem you know the solution to.

Good morning ! Have you found the solution to your problem? Because I have the same concern. THANKS

 
Good afternoon. When sending a photo to the chat room I get an error - Bad Request: wrong HTTP URL specified. Can you tell me what can be the problem?
 
SendMessage function works, but SendPhoto function gives an error Bad Request: wrong HTTP URL specified