Created
September 15, 2015 23:45
-
-
Save CyrusNuevoDia/58d953ab77ba083de363 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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