This repository has been archived on 2024-03-04. You can view files and clone it, but cannot push or open issues or pull requests.
linux/.config/bash/module/notify.sh

12 lines
610 B
Bash
Raw Normal View History

2023-12-07 04:02:47 +03:00
# Send Telegram notification.
# Usage: notify <MESSAGE>
2023-12-07 01:44:42 +03:00
function notify() {
2023-12-05 21:50:45 +03:00
curl -X POST -H 'Content-Type: Application/json' -d "{\"chat_id\":\"155897358\",\"text\":\"$1\"}" https://api.telegram.org/bot2046849441:AAHQpjRK4xpL8tEUyN4JTSDUUze4J0wSIy4/sendMessage &> /dev/null
2023-08-08 16:24:15 +03:00
}
2023-12-07 04:02:47 +03:00
# Send silent Telegram notification.
# Usage: notify_silent <MESSAGE>
2023-12-07 01:44:42 +03:00
function notify_silent() {
2023-12-05 21:50:45 +03:00
curl -X POST -H 'Content-Type: Application/json' -d "{\"chat_id\":\"155897358\",\"text\":\"$1\",\"disable_notification\":\"true\"}" https://api.telegram.org/bot2046849441:AAHQpjRK4xpL8tEUyN4JTSDUUze4J0wSIy4/sendMessage &> /dev/null
2023-08-08 16:24:15 +03:00
}