diff --git a/bot.py b/bot.py index 3859daf..4afeece 100644 --- a/bot.py +++ b/bot.py @@ -1299,7 +1299,7 @@ async def post_init(application: Application): await application.bot.set_my_commands(commands) # Инициализация планировщика cron-задач - cron_tool = tools_registry.get_tool('cron_tool') + cron_tool = tools_registry.get('cron_tool') if cron_tool: scheduler = init_scheduler(cron_tool, ai_agent, send_notification=send_cron_notification) await scheduler.start() diff --git a/bot/handlers/commands.py b/bot/handlers/commands.py index 1b3d2d0..105c0ca 100644 --- a/bot/handlers/commands.py +++ b/bot/handlers/commands.py @@ -132,9 +132,9 @@ async def cron_command(update: Update, context: ContextTypes.DEFAULT_TYPE): """ user_id = update.effective_user.id args = context.args - + # Получаем cron инструмент - cron_tool = tools_registry.get_tool('cron_tool') + cron_tool = tools_registry.get('cron_tool') if not cron_tool: await update.message.reply_text("❌ Ошибка: cron инструмент не найден") return