Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
BOT_TOKEN="<token>"
CHAT_ID="<id>"
TELEGRAM_USERNAME="<username>"
send_telegram_message() {
local message="$1"
curl -s -X POST "https://api.telegram.org/bot$BOT_TOKEN/sendMessage" \
-d chat_id="$CHAT_ID" \