fix: accept domain-only URLs like google.com

The is_url() function now accepts any string with a dot and no spaces,
not just URLs with http:// or containing /. This allows /update 2 -link google.com
to properly set the link instead of treating google.com as text.
This commit is contained in:
shokollm
2026-04-04 23:35:22 +00:00
parent 7a4d938c41
commit 7c238b44c8

View File

@@ -71,7 +71,9 @@ def parse_args(
return False return False
if s.startswith("http://") or s.startswith("https://"): if s.startswith("http://") or s.startswith("https://"):
return True return True
return "." in s and "/" in s if "." in s and " " not in s:
return True
return False
i = 0 i = 0
while i < len(args): while i < len(args):