Add feature to display who reported the message

master
Joca 2023-01-19 22:03:35 -03:00 committed by Gitea
parent cbcdc357df
commit 61e41f6d82
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
url_view = discord.ui.View()
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)