Suppression mention inutile

This commit is contained in:
Mylloon 2021-09-06 11:58:04 +02:00
parent d19bfca3cd
commit 174072f645

View file

@ -207,9 +207,9 @@ 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:
url_embed = f"Tiktok partagé par {message.author.mention}{url.replace('tiktok.com', 'dstn.to')}"
if message.content == url.replace(' ',''):
await message.channel.send(url_embed)
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')}")
await message.delete()
else:
await message.reply(url_embed)
await message.reply(f"{url_embed}", mention_author = False)