G
G
Grigory Shchetintsev2017-09-19 09:35:05
Mikrotik
Grigory Shchetintsev, 2017-09-19 09:35:05

How to make a line break in a Telegram bot message for MikroTik?

There are similar questions nearby about line wrapping when using the Telegram API, but the recommendations on them do not help.
Scripts in MikroTik RouterOS are specific.
I give the command:

:tool fetch url=("https://api.telegram.org/bot" . $BOTTOKEN . "/sendmessage\?chat_id=" . $CHATID . "&text=Info for $"NAME" \r\n Now") keep-result=no

So, what I just did not try to put in place \r\n
My attempts:
\r\n - the first part of the message arrives, the word Now is lost.
Info for Mikrotik
\13\10 - only spaces remain in HEX encoding but all words come in
Info for Mikrotik Now
%5Cr%5Cn - When encoding URLENCODE \r\n comes as plain text
Info for Mikrotik \r\n Now
The question is, has anyone already tried to solve such a problem?
I don’t really want to throw out a bunch of information in separate messages ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
evil_eyes, 2017-09-19
@Narakot

Try %0A

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question