forked from jocadbz/os-release-bot
Rewrite the status command
parent
61e41f6d82
commit
4d19b76a65
7
bot.py
7
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.")
|
||||
|
||||
|
|
Loading…
Reference in New Issue