diff --git a/apps/telegram-bot/commands.py b/apps/telegram-bot/commands.py index b13f56b..aa0ec9d 100644 --- a/apps/telegram-bot/commands.py +++ b/apps/telegram-bot/commands.py @@ -106,14 +106,14 @@ def parse_args( arg = args[i] if arg == "-link": - if i + 1 < len(args): + if i + 1 < len(args) and not args[i + 1].startswith("-"): link = args[i + 1] i += 2 else: clear_link = True i += 1 elif arg == "-date": - if i + 1 < len(args): + if i + 1 < len(args) and not args[i + 1].startswith("-"): due_date_ts = parse_date_with_tz(args[i + 1]) if due_date_ts is not None: i += 2