22 lines
675 B
Python
22 lines
675 B
Python
"Tracking everything bot"
|
|
import logging
|
|
from telegram.ext import Updater
|
|
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
|
|
level=logging.INFO)
|
|
from telegram.ext import CommandHandler
|
|
import config
|
|
|
|
def start(update, ctx):
|
|
"/start"
|
|
ctx.bot.send_message(chat_id=update.effective_chat.id,
|
|
text=("Welcome to TEB.\n\n/f for food\n/w for workout"
|
|
"\n/s for studies"))
|
|
|
|
updater = Updater(token=config.TOKEN, use_context=True)
|
|
dispatcher = updater.dispatcher
|
|
|
|
start_handler = CommandHandler('start', start)
|
|
dispatcher.add_handler(start_handler)
|
|
|
|
updater.start_polling()
|