mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-07-08 17:14:30 +02:00
telegram-chat: make messages silent...
... at least those not indicating an error.
This commit is contained in:
parent
73194b92cf
commit
bcc10c8285
1 changed files with 2 additions and 2 deletions
|
@ -78,7 +78,7 @@ $WaitFullyConnected;
|
||||||
:if ($Trusted = true) do={
|
:if ($Trusted = true) do={
|
||||||
:local Done false;
|
:local Done false;
|
||||||
:if ($Message->"text" = "?") do={
|
:if ($Message->"text" = "?") do={
|
||||||
$SendTelegram2 ({ origin=$0; chatid=($Chat->"id"); silent=false; replyto=($Message->"message_id"); \
|
$SendTelegram2 ({ origin=$0; chatid=($Chat->"id"); silent=true; replyto=($Message->"message_id"); \
|
||||||
subject=([ $SymbolForNotification "speech-balloon" ] . "Telegram Chat"); \
|
subject=([ $SymbolForNotification "speech-balloon" ] . "Telegram Chat"); \
|
||||||
message=("Online, awaiting your commands!") });
|
message=("Online, awaiting your commands!") });
|
||||||
:set Done true;
|
:set Done true;
|
||||||
|
@ -108,7 +108,7 @@ $WaitFullyConnected;
|
||||||
:set State "The command failed with an error!\n\n";
|
:set State "The command failed with an error!\n\n";
|
||||||
}
|
}
|
||||||
:local Content [ /file/get ($File . ".txt") contents ];
|
:local Content [ /file/get ($File . ".txt") contents ];
|
||||||
$SendTelegram2 ({ origin=$0; chatid=($Chat->"id"); silent=false; replyto=($Message->"message_id"); \
|
$SendTelegram2 ({ origin=$0; chatid=($Chat->"id"); silent=true; replyto=($Message->"message_id"); \
|
||||||
subject=([ $SymbolForNotification "speech-balloon" ] . "Telegram Chat"); \
|
subject=([ $SymbolForNotification "speech-balloon" ] . "Telegram Chat"); \
|
||||||
message=("Command:\n" . $Message->"text" . "\n\n" . $State . [ $IfThenElse ([ :len $Content ] > 0) \
|
message=("Command:\n" . $Message->"text" . "\n\n" . $State . [ $IfThenElse ([ :len $Content ] > 0) \
|
||||||
("Output:\n" . $Content) [ $IfThenElse ([ /file/get ($File . ".txt") size ] > 0) \
|
("Output:\n" . $Content) [ $IfThenElse ([ /file/get ($File . ".txt") size ] > 0) \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue