telegram-chat: say hello when awaiting commands

This commit is contained in:
Christian Hesse 2025-02-25 21:26:52 +01:00
parent c33eb41c9c
commit 4eafcaa3ac

View file

@ -119,7 +119,8 @@
$SendTelegram2 ({ origin=$ScriptName; chatid=($Chat->"id"); silent=true; \ $SendTelegram2 ({ origin=$ScriptName; chatid=($Chat->"id"); silent=true; \
replyto=($Message->"message_id"); threadid=$ThreadId; \ replyto=($Message->"message_id"); threadid=$ThreadId; \
subject=([ $SymbolForNotification "speech-balloon" ] . "Telegram Chat"); \ subject=([ $SymbolForNotification "speech-balloon" ] . "Telegram Chat"); \
message=("Online" . [ $IfThenElse $TelegramChatActive " (and active!)" ] . ", awaiting your commands!") }); message=([ $IfThenElse ([ :len ($From->"first_name") ] > 0) ("Hello " . ($From->"first_name") . "!\n\n") ] . \
"Online" . [ $IfThenElse $TelegramChatActive " (and active!)" ] . ", awaiting your commands!") });
:set Done true; :set Done true;
} }
:if ($Done = false && [ :pick $Command 0 1 ] = "!") do={ :if ($Done = false && [ :pick $Command 0 1 ] = "!") do={