From 4e52f2c08e08135d9d9e58c9cbd52a2ae956548e Mon Sep 17 00:00:00 2001 From: Sam Huddart Date: Mon, 15 May 2023 00:09:44 +0100 Subject: [PATCH] Update run.py fix duplication bug --- run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.py b/run.py index 21bb36e..9d3d306 100644 --- a/run.py +++ b/run.py @@ -87,7 +87,7 @@ async def do(): if message.content.__contains__("https://open.spotify.com/track"): for url in re.findall(regex, message.content): url, sep, end = f"{url[0]}://{url[1]}{url[2]}".partition("?si=") - if url not in existing_urls: + if (url not in existing_urls) and (url not in new_urls): new_urls.append(url) print(f"New URL found, {url}")