mirror of
https://github.com/c0de-archive/pixoPython.git
synced 2024-12-21 13:02:40 +00:00
Get started on server
This commit is contained in:
parent
ce77d1348a
commit
9501c284b8
21
server/main.py
Normal file
21
server/main.py
Normal file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from bottle import route, run, template
|
||||
from telegram.ext import Updater
|
||||
import logging
|
||||
import os
|
||||
|
||||
updater = Updater(os.env.get('TGTOKEN'))
|
||||
dispatcher = updater.dispatcher
|
||||
|
||||
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
|
||||
level=logging.INFO)
|
||||
|
||||
def start_tgbot(bot, update):
|
||||
introtext = """Hello! My purpose is to control an IOT RGB LED matrix
|
||||
|
||||
To get started I will need to establish a connection to your device.
|
||||
Please send `/newdevice` to get started
|
||||
"""
|
||||
bot.send_message(chat_id=update.message.chat_id,
|
||||
text=introtext)
|
Loading…
Reference in New Issue
Block a user