citation: reply when message can not be deleted

This commit is contained in:
Mylloon 2021-02-22 04:19:36 +01:00
parent 91b33b0535
commit c2f4444792

View file

@ -141,9 +141,11 @@ async def on_message(message):
if auteur == "Auteur":
cite = f"\nCité par {user_or_nick(message.author)} le {date_2}"
embed.set_footer(icon_url = icon_url, text = f"{message_1}{cite}")
await message.channel.send(embed = embed)
if message.content == linkURL.replace(' ',''):
await message.channel.send(embed = embed)
await message.delete()
else:
await message.reply(embed = embed)
except Exception as e:
e = str(e)
if not "invalid literal for int() with base 10:" in e or not "404 Not Found (error code: 10008)" in e: # faute de frappe / message supprimé