#!/bin/bash
# Send Telegram alert via OpenClaw message tool

ALERT_FILE="/home/ubuntu/.openclaw/workspace/shared/projects/swamp-rabbit-moving/.dashboard_alert"

if [ -f "$ALERT_FILE" ]; then
    MESSAGE=$(cat "$ALERT_FILE")
    
    # Use OpenClaw's session to send message
    # This will be picked up by the agent
    echo "$MESSAGE"
    
    # Remove alert file
    rm -f "$ALERT_FILE"
fi
