Skip to content

Instantly share code, notes, and snippets.

@CyrusNuevoDia
Created September 15, 2015 23:45
Show Gist options
  • Save CyrusNuevoDia/58d953ab77ba083de363 to your computer and use it in GitHub Desktop.
Save CyrusNuevoDia/58d953ab77ba083de363 to your computer and use it in GitHub Desktop.
import requests
TOKEN = ""
BASE = "https://api.telegram.org/bot{0}".format(token)
def send_message(params):
if "chat_id" not in params or "text" not in params:
return
return requests.get(BASE + "/sendMessage", params=params)
if __name__ == "__main__":
send_message({"chat_id": 1203120, "text": "Hello. I am bot."})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment