Add bot structure, sample config

This commit is contained in:
Ceda EI 2019-01-22 15:47:37 +05:30
parent 3525ebdccc
commit 7581a15266
2 changed files with 19 additions and 0 deletions

13
bot/bot.py Normal file
View File

@ -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))

6
bot/sample.config.py Normal file
View File

@ -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