Fixed schedule_post command argument parsing to properly handle context.args

This commit is contained in:
2025-10-15 16:40:08 +03:00
parent 24450565ed
commit fb50eb1a19
+8 -3
View File
@@ -953,9 +953,14 @@ ID: {user_info['ID']}
await update.message.reply_text(SCHEDULER_MESSAGES['usage_schedule']) await update.message.reply_text(SCHEDULER_MESSAGES['usage_schedule'])
return return
# Парсинг времени и текста # Парсинг времени и текста - исправляем обработку аргументов
time_str = context.args[0] args = context.args if hasattr(context, 'args') else []
text = ' '.join(context.args[1:]) if not args:
await update.message.reply_text(SCHEDULER_MESSAGES['usage_schedule'])
return
time_str = args[0]
text = ' '.join(args[1:])
try: try:
schedule_time = self.parse_schedule_time(time_str) schedule_time = self.parse_schedule_time(time_str)