Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python telegram

import requests

def telegram(bot_alert):
   bot_token = 'your telegram bot token'
   my_chatID = 'your chat ID'
   send_text = 'https://api.telegram.org/bot' + bot_token + '/sendMessage?chat_id=' + my_chatID + '&parse_mode=Markdown&text=' + "*" + bot_alert + "*"

   response = requests.get(send_text)
   return response.json()
Source by pypi.org #
 
PREVIOUS NEXT
Tagged: #python #telegram
ADD COMMENT
Topic
Name
3+8 =