Add bot structure, sample config
This commit is contained in:
parent
3525ebdccc
commit
7581a15266
13
bot/bot.py
Normal file
13
bot/bot.py
Normal 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
6
bot/sample.config.py
Normal 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
|
Loading…
x
Reference in New Issue
Block a user