From 76cbdee62f6df30f5c3c3d3594d4dfe24e0bca57 Mon Sep 17 00:00:00 2001 From: drbot7 <46543473+drbot7@users.noreply.github.com> Date: Mon, 21 Jun 2021 20:01:28 -0500 Subject: [PATCH] fix valueerror when parsing version 1.17(.0) --- cogs/timings.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cogs/timings.py b/cogs/timings.py index aec5920..436b186 100644 --- a/cogs/timings.py +++ b/cogs/timings.py @@ -32,7 +32,7 @@ class Timings(commands.Cog): for word in words: if word.startswith("https://timin") and "/d=" in word: - word.replace("/d=", "/?id=") + word.replace("/d=", "/?id=") # this seems to be a common issue when people post their links if word.startswith("https://timin") and "/?id=" in word: timings_url = word embed_var.url = timings_url @@ -71,6 +71,10 @@ class Timings(commands.Cog): try: try: version = request["timingsMaster"]["version"] if "version" in request["timingsMaster"] else None + print(version) + if version.count('.') == 1: + version = version[:-1] + version = version + ".0)" if "version" in TIMINGS_CHECK and version: version_result = VERSION_REGEX.search(version) version_result = version_result.group() if version_result else None