diff options
author | 2022-09-28 09:42:52 +0100 | |
---|---|---|
committer | 2022-09-28 09:42:52 +0100 | |
commit | caa26982526518dbfa06c187a560078c731ca774 (patch) | |
tree | f275a5e614e189db6138405dd99686421775a84c | |
parent | collect all urls in a set to avoid duplicates (diff) |
check for the url existence in the final_urls set
-rw-r--r-- | bot/exts/filters/filtering.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/filters/filtering.py b/bot/exts/filters/filtering.py index b61204f4a..3fb40b719 100644 --- a/bot/exts/filters/filtering.py +++ b/bot/exts/filters/filtering.py @@ -657,7 +657,7 @@ class Filtering(Cog): # Discord renders it as https://twitter.com/something for url in urls: final_urls.add(remove_subdomain_from_url(url)) - if not embed.url or embed.url not in urls: + if not embed.url or embed.url not in final_urls: # If `embed.url` does not exist or if `embed.url` is not part of the content # of the message, it's unlikely to be an auto-generated embed by Discord. return msg.embeds |