From fb50eb1a1970bcb85d0ae09ba94104d5f7ec880f Mon Sep 17 00:00:00 2001 From: FerraSoft Date: Wed, 15 Oct 2025 16:40:08 +0300 Subject: [PATCH] Fixed schedule_post command argument parsing to properly handle context.args --- bot.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bot.py b/bot.py index 333189c..65599d3 100644 --- a/bot.py +++ b/bot.py @@ -953,9 +953,14 @@ ID: {user_info['ID']} await update.message.reply_text(SCHEDULER_MESSAGES['usage_schedule']) return - # Парсинг времени и текста - time_str = context.args[0] - text = ' '.join(context.args[1:]) + # Парсинг времени и текста - исправляем обработку аргументов + args = context.args if hasattr(context, 'args') else [] + if not args: + await update.message.reply_text(SCHEDULER_MESSAGES['usage_schedule']) + return + + time_str = args[0] + text = ' '.join(args[1:]) try: schedule_time = self.parse_schedule_time(time_str)