From c2f44447924c734e53a20996dfc3975dfed259ff Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 22 Feb 2021 04:19:36 +0100 Subject: [PATCH] citation: reply when message can not be deleted --- src/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index 8bd0fd7..3cc63ff 100644 --- a/src/main.py +++ b/src/main.py @@ -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é