This commit is contained in:
@@ -10,7 +10,7 @@ API_TOKEN = os.getenv("BOT_TOKEN")
|
||||
|
||||
bot = Bot(token=API_TOKEN)
|
||||
dp = Dispatcher(bot)
|
||||
timer_manager = TimerManager(bot)
|
||||
timer_manager = None
|
||||
|
||||
menu_kb = InlineKeyboardMarkup(row_width=2)
|
||||
menu_kb.add(
|
||||
@@ -43,7 +43,9 @@ async def handle_callback(call: types.CallbackQuery):
|
||||
from pomodoro_bot.redis_client import init_redis
|
||||
|
||||
async def on_startup(dispatcher):
|
||||
global timer_manager
|
||||
await init_redis()
|
||||
timer_manager = TimerManager(bot, dispatcher.loop)
|
||||
|
||||
def run_bot():
|
||||
executor.start_polling(dp, skip_updates=True, on_startup=on_startup)
|
||||
Reference in New Issue
Block a user