From f9572d4cd28a8a48f667492735f80dbcff4499fb Mon Sep 17 00:00:00 2001 From: Jocadbz Date: Thu, 19 Jan 2023 22:03:35 -0300 Subject: [PATCH 1/2] Add feature to display who reported the message --- bot.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bot.py b/bot.py index 91604b9..7718a5f 100644 --- a/bot.py +++ b/bot.py @@ -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) -- 2.30.2 From 280188cc9ff56c2b1e0a80df64e6af6e6a1e5a93 Mon Sep 17 00:00:00 2001 From: Jocadbz Date: Thu, 19 Jan 2023 22:15:19 -0300 Subject: [PATCH 2/2] Rewrite the status command --- bot.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 7718a5f..846c6d4 100644 --- a/bot.py +++ b/bot.py @@ -101,9 +101,12 @@ async def report_message(interaction: discord.Interaction, message: discord.Mess @client.tree.command(name="status") async def status(interaction: discord.Interaction): embed = discord.Embed(title='System Stats') - embed.description = f"""Uptime: {seconds_elapsed()} -System: {sys.platform}""" + embed.add_field(name="Uptime:", value=seconds_elapsed(), inline=True) + embed.add_field(name="System:", value=sys.platform, inline=True) + embed.add_field(name="Version:", value="v1.2.0", inline=True) url_view = discord.ui.View() + url_view.add_item(discord.ui.Button(label='See the source code', style=discord.ButtonStyle.url, url="https://lostcave.ddnss.de/git/jocadbz/os-release-bot")) + url_view.add_item(discord.ui.Button(label='Report a issue', style=discord.ButtonStyle.url, url="https://lostcave.ddnss.de/git/jocadbz/os-release-bot/issues")) await interaction.response.send_message(embed=embed, view=url_view) print("Status queried.") -- 2.30.2