forked from jocadbz/os-release-bot
Remove useless information from status command and make it configurable
parent
4d19b76a65
commit
ae203e2ad3
9
bot.py
9
bot.py
|
@ -100,13 +100,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 = discord.Embed(title='/etc/os-release bot by jocadbz')
|
||||
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)
|
||||
embed.add_field(name="Version:", value=config["bot version"], inline=True)
|
||||
embed.set_footer(text=config["bot issues"])
|
||||
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"))
|
||||
url_view.add_item(discord.ui.Button(label='View source...', style=discord.ButtonStyle.url, url=config["bot source url"]))
|
||||
await interaction.response.send_message(embed=embed, view=url_view)
|
||||
print("Status queried.")
|
||||
|
||||
|
|
|
@ -4,5 +4,9 @@
|
|||
"assign0": 1063506453308125274,
|
||||
"assign1": 1063506544962064414
|
||||
},
|
||||
"report channel": 1063507041697677312
|
||||
"report channel": 1063507041697677312,
|
||||
|
||||
"bot version": "v1.3",
|
||||
"bot issues": "Please report issues to BodgeMaster or jocadbz.",
|
||||
"bot source url": "https://lostcave.ddnss.de/git/jocadbz/os-release-bot"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue