From a92f4b4b034bc73575373a2f73dae16fa039212b Mon Sep 17 00:00:00 2001 From: SamNet-dev Date: Wed, 4 Feb 2026 18:15:14 -0600 Subject: [PATCH] feat: telegram bot improvements (#16) - Send startup notification when telegram service starts - Use generic "Service" messages (works for both/single backend) --- paqctl.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/paqctl.sh b/paqctl.sh index a87e9f5..2a197b2 100644 --- a/paqctl.sh +++ b/paqctl.sh @@ -4751,10 +4751,10 @@ except: pass case "$cmd" in /status) send_message "$(build_report)" ;; /health) send_message "$(/usr/local/bin/paqctl health 2>&1 | head -30)" ;; - /restart) /usr/local/bin/paqctl restart 2>&1; send_message "🔄 paqet restarted" ;; - /stop) /usr/local/bin/paqctl stop 2>&1; send_message "⏹ paqet stopped" ;; - /start) /usr/local/bin/paqctl start 2>&1; send_message "▶️ paqet started" ;; - /version) send_message "📦 paqet: ${PAQET_VERSION:-unknown} | paqctl: ${PAQCTL_VERSION:-unknown}" ;; + /restart) /usr/local/bin/paqctl restart 2>&1; send_message "🔄 Service restarted" ;; + /stop) /usr/local/bin/paqctl stop 2>&1; send_message "⏹ Service stopped" ;; + /start) /usr/local/bin/paqctl start 2>&1; send_message "▶️ Service started" ;; + /version) send_message "📦 Version: ${PAQET_VERSION:-unknown} | paqctl: ${PAQCTL_VERSION:-unknown}" ;; esac done <<< "$cmds" fi @@ -4784,6 +4784,9 @@ except: print(0) fi LAST_UPDATE_ID=${LAST_UPDATE_ID:-0} +# Send startup notification +send_message "🚀 *Telegram notifications started*"$'\n'"Reports every ${TELEGRAM_INTERVAL}h | Alerts: ${TELEGRAM_ALERTS_ENABLED}" + while true; do # Reload settings periodically (safe parser, no code execution) _load_settings