Created
May 23, 2017 08:52
-
-
Save olegbuevich/65d362bc9aeff38187093b2946c70a4b to your computer and use it in GitHub Desktop.
[python] send message to telegram chat from bot
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
# pip install python-telegram-bot | |
from telegram import bot | |
# example values | |
BOT_TOKEN='123456789:jhsagdhg_sakjdKHGKuyasgdkhsabdas' | |
CHAT_ID='7125376' | |
tbot = bot.Bot(BOT_TOKEN) | |
tbot.send_message(chat_id=CHAT_ID, text='Message from python') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment