diff --git a/handlers/commands.py b/handlers/commands.py index fa27184..253e39d 100644 --- a/handlers/commands.py +++ b/handlers/commands.py @@ -2839,11 +2839,17 @@ class BotInterface: elif state["step"] == "twitch_ctr": try: - min_ctr, max_ctr = parse_range(text, default_min=1) - if min_ctr <= 0 or max_ctr > 100: + parts = text.replace(",", ".").split("-") + if len(parts) == 2: + min_ctr, max_ctr = float(parts[0].strip()), float(parts[1].strip()) + elif len(parts) == 1: + min_ctr = max_ctr = float(parts[0].strip()) + else: + raise ValueError + if min_ctr <= 0 or max_ctr > 100 or min_ctr > max_ctr: raise ValueError except (ValueError, Exception): - await self._send_temp(message, "❌ Введите диапазон `0.8-1.2` или одно число `1`") + await self._send_temp(message, "❌ Введите диапазон `0.5-1.5` или одно число `1`") return await self._clean_prev(message) del self._user_task_state[user_id]