From b8511344afba07dab8025b9f263a0495ce3298ac Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 11 Feb 2019 12:48:56 +0100 Subject: [PATCH] Add new script --- chatasthebot.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 chatasthebot.py diff --git a/chatasthebot.py b/chatasthebot.py new file mode 100644 index 00000000..9e4c2c88 --- /dev/null +++ b/chatasthebot.py @@ -0,0 +1,14 @@ +import telegram +import configparser +config = configparser.ConfigParser() +config.read("config.ini") + + +telegram_bot = telegram.Bot(config["Telegram"]["bot_token"]) + + +while True: + message = input() + telegram_bot.send_message(config["Telegram"]["main_group"], message, + parse_mode="HTML", + disable_web_page_preview=True)