From 7581a152668ad2a8044f763cea3ae074dd8cea62 Mon Sep 17 00:00:00 2001 From: Ceda EI Date: Tue, 22 Jan 2019 15:47:37 +0530 Subject: [PATCH] Add bot structure, sample config --- bot/bot.py | 13 +++++++++++++ bot/sample.config.py | 6 ++++++ 2 files changed, 19 insertions(+) create mode 100644 bot/bot.py create mode 100644 bot/sample.config.py diff --git a/bot/bot.py b/bot/bot.py new file mode 100644 index 0000000..6572240 --- /dev/null +++ b/bot/bot.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 + +import config +from telegram.ext import Updater, MessageHandler, Filters + + +def message_handling(bot, update): + pass + + +updater = Updater(token=config.api_key) +dispatcher = updater.dispatcher +dispatcher.add_handler(MessageHandler(Filters.text, message_handling)) diff --git a/bot/sample.config.py b/bot/sample.config.py new file mode 100644 index 0000000..92c1f8b --- /dev/null +++ b/bot/sample.config.py @@ -0,0 +1,6 @@ +# Create a new bot by messaging @BotFather and follow the instructions +# Replace the key by the actual token recieved from BotFather +api_key = "123456789:xxxxxxxxxxxxxxxxxxxxxxxxxxxx" + +# Port to connect to server +port = 9876