Updated External Scripts (experimental) (markdown)
@@ -1,12 +1,11 @@
|
|||||||
## Telegram notification basic script
|
## Telegram notification basic script
|
||||||
`#:/bin/sh
|
`#:/bin/sh`
|
||||||
USERID="<numeric ID from @IDBot>"
|
`USERID="<numeric ID from @IDBot>"`
|
||||||
KEY="<the API key from @BotFather>"
|
`KEY="<the API key from @BotFather>"`
|
||||||
TIMEOUT="10"
|
`TIMEOUT="10"`
|
||||||
URL="https://api.telegram.org/bot$KEY/sendMessage"
|
`URL="https://api.telegram.org/bot$KEY/sendMessage"`
|
||||||
TEXT="Shit your server is transcoding something: $1! Go check on it, noob!"
|
`TEXT="Shit your server is transcoding something: ! Go check on it, noob!"`
|
||||||
|
|
||||||
if [ "$1" != "Direct Play" ]; then
|
`if [ "" != "Direct Play" ]; then`
|
||||||
curl -s --max-time $TIMEOUT -d "chat_id=$USERID&disable_web_page_preview=1&text=$TEXT" $URL > /dev/null
|
`curl -s --max-time $TIMEOUT -d "chat_id=$USERID&disable_web_page_preview=1&text=$TEXT" $URL > /dev/null`
|
||||||
fi
|
`fi`
|
||||||
`
|
|
Reference in New Issue
Block a user