From f4c43eb15024556bd1d183adb36c58295a06a96f Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 6 Sep 2021 19:09:38 +0200 Subject: [PATCH] fix bug targeting ALL links instead of only tiktok --- src/cogs/internet.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cogs/internet.py b/src/cogs/internet.py index 67ba7e7..e737461 100644 --- a/src/cogs/internet.py +++ b/src/cogs/internet.py @@ -207,6 +207,8 @@ class Internet(commands.Cog): return urls = findall(r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', message.content) for url in urls: + if "tiktok.com" not in url: + return url_embed = url.replace("tiktok.com", "dstn.to") if message.content == url.replace(" ", ""): await message.channel.send(f"Tiktok partagé par {message.author.mention} • {url.replace('tiktok.com', 'dstn.to')}")