mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-05 10:44:59 +02:00
telegram-chat: answer question mark with short notice
This commit is contained in:
parent
15873e2fdb
commit
1b62545d8c
3 changed files with 13 additions and 2 deletions
|
@ -77,7 +77,13 @@ $WaitFullyConnected;
|
|||
|
||||
:if ($Trusted = true) do={
|
||||
:local Done false;
|
||||
:if ([ :pick ($Message->"text") 0 1 ] = "!") do={
|
||||
:if ($Message->"text" = "?") do={
|
||||
$SendTelegram2 ({ origin=$0; chatid=($Chat->"id"); silent=false; replyto=($Message->"message_id"); \
|
||||
subject=([ $SymbolForNotification "speech-balloon" ] . "Telegram Chat"); \
|
||||
message=("Online, awaiting your commands!") });
|
||||
:set Done true;
|
||||
}
|
||||
:if ($Done = false && [ :pick ($Message->"text") 0 1 ] = "!") do={
|
||||
:if ($Message->"text" ~ ("^! *(" . [ $EscapeForRegEx $Identity ] . "|@" . $TelegramChatGroups . ")\$")) do={
|
||||
:set TelegramChatActive true;
|
||||
} else={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue