Files
ableton-mcp-ai/AbletonMCP_AI_BAK_20260328_200801/automation/send_telegram_notification.ps1
renato97 6ec8663954 Initial commit: AbletonMCP-AI complete system
- MCP Server with audio fallback, sample management
- Song generator with bus routing
- Reference listener and audio resampler
- Vector-based sample search
- Master chain with limiter and calibration
- Fix: Audio fallback now works without M4L
- Fix: Full song detection in sample loader

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-28 22:53:10 -03:00

34 lines
983 B
PowerShell

param(
[Parameter(Mandatory = $true)]
[string]$Message,
[string]$BotToken = $env:TELEGRAM_BOT_TOKEN,
[string]$ChatId = $env:TELEGRAM_CHAT_ID,
[string]$ConfigPath = (Join-Path $PSScriptRoot "telegram.local.json")
)
$ErrorActionPreference = "Stop"
if (([string]::IsNullOrWhiteSpace($BotToken) -or [string]::IsNullOrWhiteSpace($ChatId)) -and (Test-Path -LiteralPath $ConfigPath)) {
$config = Get-Content -LiteralPath $ConfigPath -Raw | ConvertFrom-Json
if ([string]::IsNullOrWhiteSpace($BotToken)) {
$BotToken = $config.bot_token
}
if ([string]::IsNullOrWhiteSpace($ChatId)) {
$ChatId = $config.chat_id
}
}
if ([string]::IsNullOrWhiteSpace($BotToken) -or [string]::IsNullOrWhiteSpace($ChatId)) {
exit 0
}
$uri = "https://api.telegram.org/bot$BotToken/sendMessage"
$body = @{
chat_id = $ChatId
text = $Message
disable_web_page_preview = $true
}
Invoke-RestMethod -Uri $uri -Method Post -Body $body | Out-Null