file section before author section

This commit is contained in:
Mylloon 2021-09-02 20:23:35 +02:00
parent cf4d90db44
commit 5180500d7e

View file

@ -57,10 +57,6 @@ class Citation(commands.Cog):
if not len(msgID.content) > 0: if not len(msgID.content) > 0:
desc = f"Un fichier joint : {msgFiles[0].filename}" desc = f"Un fichier joint : {msgFiles[0].filename}"
embed = discord.Embed(description = desc, colour = couleur) embed = discord.Embed(description = desc, colour = couleur)
auteur = "Auteur"
if message.author == msgID.author:
auteur = "Auteur & Citateur"
embed.add_field(name = auteur, value = msgID.author.mention, inline=True)
try: try:
if len(msgFiles) == 1: if len(msgFiles) == 1:
if msgFiles[0].filename[-4:].split('.')[1] in imageExtensions: if msgFiles[0].filename[-4:].split('.')[1] in imageExtensions:
@ -69,6 +65,10 @@ class Citation(commands.Cog):
embed.add_field(name = "Fichier", value = f"[Lien]({linkFile})", inline=True) embed.add_field(name = "Fichier", value = f"[Lien]({linkFile})", inline=True)
except: except:
pass pass
auteur = "Auteur"
if message.author == msgID.author:
auteur = "Auteur & Citateur"
embed.add_field(name = auteur, value = msgID.author.mention, inline=True)
embed.add_field(name = "Message", value = f"{msgID.channel.mention} - [Lien Message]({linkURL})", inline=True) embed.add_field(name = "Message", value = f"{msgID.channel.mention} - [Lien Message]({linkURL})", inline=True)
embed.set_author(name = "Citation", icon_url = msgID.author.avatar_url) embed.set_author(name = "Citation", icon_url = msgID.author.avatar_url)
icon_url = message.author.avatar_url icon_url = message.author.avatar_url