Add feature to display who reported the message

pull/2/head
Joca 2023-01-19 22:03:35 -03:00
parent 66e0d4707e
commit f9572d4cd2
1 changed files with 1 additions and 0 deletions

1
bot.py
View File

@ -94,6 +94,7 @@ async def report_message(interaction: discord.Interaction, message: discord.Mess
embed.timestamp = message.created_at embed.timestamp = message.created_at
url_view = discord.ui.View() url_view = discord.ui.View()
url_view.add_item(discord.ui.Button(label='Go to Message', style=discord.ButtonStyle.url, url=message.jump_url)) url_view.add_item(discord.ui.Button(label='Go to Message', style=discord.ButtonStyle.url, url=message.jump_url))
embed.add_field(name="Reported by:", value=interaction.user, inline=False)
await log_channel.send(embed=embed, view=url_view) await log_channel.send(embed=embed, view=url_view)