Skip to content

Instantly share code, notes, and snippets.

@positiveque
Forked from andretapxure/telegram.sh
Created November 25, 2020 17:21
Show Gist options
  • Save positiveque/e4b852cfdc54f4b82750bd1f356ca7c9 to your computer and use it in GitHub Desktop.
Save positiveque/e4b852cfdc54f4b82750bd1f356ca7c9 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Autor: remontti.com.br
#Insert your bot token without the "bot" part in the variable bellow
TOKEN="2ef92jfn2;uf9nf2nFUE(U@sadfwewoijfe#$"
USER=$1
SUBJECT=$2
MESSAGE=$3
NL="
"
curl --silent -X POST --data-urlencode "chat_id=${USER}" --data-urlencode "text=${SUBJECT}${NL}${NL}${MESSAGE}" "https://api.telegram.org/bot${TOKEN}/sendMe
ssage?disable_web_page_preview=true&parse_mode=html" | grep -q '"ok":true'
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment