Add bot structure, sample config
This commit is contained in:
parent
3525ebdccc
commit
7581a15266
|
@ -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))
|
|
@ -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…
Reference in New Issue