#!/usr/bin/env pwsh <# .SYNOPSIS Discord Reminder Handler - Called by OpenClaw to process reminder commands .DESCRIPTION Handles: add, list, delete, cleanup .EXAMPLE .\reminder-handler.ps1 add "458667380332036117" "1474636036905631867" "Call mom" "2h" .\reminder-handler.ps1 list .\reminder-handler.ps1 delete 5 #> $action = $args[0] $scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path $pythonScript = Join-Path $scriptDir "reminder-manager.py" function Get-RemindersJson { $json = & python $pythonScript "list" | Out-String return $json | ConvertFrom-Json } switch ($action) { "add" { $userId = $args[1] $channelId = $args[2] $message = $args[3] $time = $args[4] if (-not $userId -or -not $message -or -not $time) { Write-Error "Usage: add