Created
May 20, 2018 15:01
-
-
Save ryanhs/890072a0ec2a2a272abf238c2761db57 to your computer and use it in GitHub Desktop.
tele notif example
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 | |
notify() { | |
user_id=<your tele id> | |
bot_token=<your tele bot token> | |
message=$1 | |
curl --data chat_id="${user_id}" \ | |
--data "text=${message}" \ | |
"https://api.telegram.org/bot${bot_token}/sendMessage" | |
} | |
notify "some message example with `date`" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment