Ajout de la source du message

This commit is contained in:
Mylloon 2021-09-06 11:50:16 +02:00
parent c5e7271296
commit d19bfca3cd

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 = url.replace("tiktok.com", "dstn.to")
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)
await message.delete()
else:
await message.reply(url_embed, mention_author = False)
await message.reply(url_embed)