Hook#buildwithclaude
0
Telegram error notifications
Uzun süren operasyonlar ve önemli etkinlikler için Telegram bildirimleri gönderin
yazan kuscubasiece·8 Eylül 2026
Kaynak: davepoon/claude-code-subagents-collection · MIT
Uzun süren operasyonlar ve önemli etkinlikler için Telegram bildirimleri gönderin
Kaynak: davepoon/claude-code-subagents-collection · MIT
curl -sL https://www.antrophiclove.com/api/kaynak/telegram-error-notifications/rawBu içerik mevcut dosyaya elle harmanlanmalı: .claude/settings.json
Send Telegram notifications for long-running operations and important events
PostToolUseBashTELEGRAM_BOT_TOKENTELEGRAM_CHAT_ID#!/bin/bash
if [[ -z "$TELEGRAM_BOT_TOKEN" ]] || [[ -z "$TELEGRAM_CHAT_ID" ]]; then
exit 0
fi
# Check if the tool result indicates an error
tool_result=$(jq -r '.tool_result // empty')
if echo "$tool_result" | grep -qi "error\|failed\|exception"; then
command=$(jq -r '.tool_input.command // "unknown"' | head -c 100)
message="⚠️ Claude Code Error: ${command}"
url="https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage"
curl -s -X POST "$url" \
-d "chat_id=${TELEGRAM_CHAT_ID}" \
-d "text=${message}" >/dev/null 2>&1
fi