Skip to content

Commit 29cd939

Browse files
authored
Replace restart command with performance command
Replaced the 'restart' command with a 'performance' command that checks the bot's status.
1 parent b75169b commit 29cd939

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

command/dev/restart.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818

1919
client = square.Client(api_key=SQUARE_TOKEN)
2020

21-
@bot.tree.command(name="restart", description="Reinicia a LuaBot em casos de emergência :D")
22-
async def restart(interaction: discord.Interaction):
23-
if not OWNER_ID:
24-
await interaction.response.send_message("Você não pode me reiniciar! >:C")
25-
else:
26-
await client.restart_app(SQUARE_APP_ID)
27-
print("Reiniciando...")
21+
@bot.tree.command(name="performance", description="[Dev] Veja a performance da LuaBot!")
22+
async def performance(interaction: discord.Interaction):
23+
if str(interaction.user.id) != OWNER_ID:
24+
await interaction.response.send_message("Tá querendo ver se eu tô funcionando? Pois não pode!")
25+
if str(interaction.user.id) == OWNER_ID:
26+
status = await client.app_status(SQUARE_APP_ID) # StatusData(...)
27+
28+
await interaction.response.send_message(f"Performance: **RAM:**{status.ram}, **CPU:** {status.cpu}, **Network:** {status.network}")

0 commit comments

Comments
 (0)