Created
March 15, 2024 04:27
-
-
Save gerardsimons/aaeb5c1545fbb4a246dd7815c5209cbf to your computer and use it in GitHub Desktop.
Telegram notification
This file contains 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
function telegram_notify | |
set encoded_text (python -c "import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))" "$argv") | |
curl "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage?chat_id=$TELEGRAM_BOT_CHANNEL&text=$encoded_text" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment