Created
January 2, 2017 15:10
-
-
Save icedraco/5e5161f05ff6af15c2f37a39cd11baf7 to your computer and use it in GitHub Desktop.
Simple personal Telegram notifiation script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Based on the guide here: | |
# https://www.forsomedefinition.com/automation/creating-telegram-bot-notifications/ | |
TOKEN="################################" | |
CHAT_ID="12345678" | |
URL="https://api.telegram.org/bot$TOKEN/sendMessage" | |
TIME=10 | |
TEXT="$1" | |
curl -s --max-time $TIME -d "chat_id=$CHAT_ID&text=$TEXT" $URL > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment