mirror of
https://github.com/laspavel/mikrotik-scripts.git
synced 2025-07-15 09:04:31 +02:00
Add new scripts. 06.12.2020
This commit is contained in:
parent
4705b8aa67
commit
f261bde503
6 changed files with 41 additions and 2 deletions
12
TelegramMessage.rsc
Normal file
12
TelegramMessage.rsc
Normal file
|
@ -0,0 +1,12 @@
|
|||
:do {
|
||||
#:local MessageText "TestMain";
|
||||
:local BotToken "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
|
||||
:local ChatID "99999999";
|
||||
:local SendText $MessageText;
|
||||
:local tgUrl "https://api.telegram.org/bot$BotToken/sendMessage\?chat_id=$ChatID&text=$SendText&parse_mode=html&disable_web_page_preview=True";
|
||||
/tool fetch url=($tgUrl) keep-result=no;
|
||||
|
||||
#:log info "Send Telegram Message: $MessageText";
|
||||
} on-error={
|
||||
/log error "***** SendTelegram finished with error ******"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue