Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from telegram.utils.request import Request
- from telegram import Bot
- from telegram.ext import CommandHandler, Updater
- from bot_config import API_TOKEN
- from bot_decorators import log_error
- import bot_timers as alerts
- req = Request(connect_timeout=3)
- bot = Bot(request=req, token=API_TOKEN)
- updater = Updater(bot=bot, use_context=True)
- dispatcher = updater.dispatcher
- # ALERTS_TIMERS_EVENT_LOOP = alerts.run_timers_event_loop(bot=bot)
- @log_error
- def start(update, context):
- context.bot.send_message(chat_id=update.effective_chat.id, text="Запуск ивент лупа")
- timers_event_loop = alerts.run_timers_event_loop(bot=bot)
- timers_event_loop.start()
- # ALERTS_TIMERS_EVENT_LOOP.start()
- start_handler = CommandHandler('start', start)
- dispatcher.add_handler(start_handler)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement