Skip to content

Commit da64d1b

Browse files
authored
Change performance command to restart command
1 parent 29cd939 commit da64d1b

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

command/dev/restart.py

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

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

21-
@bot.tree.command(name="performance", description="[Dev] Veja a performance da LuaBot!")
22-
async def performance(interaction: discord.Interaction):
21+
@bot.tree.command(name="restart", description="Reinicia a LuaBot em casos de emergência :D")
22+
async def restart(interaction: discord.Interaction):
2323
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(...)
24+
await interaction.response.send_message("Você não pode me reiniciar! >:C")
2725

28-
await interaction.response.send_message(f"Performance: **RAM:**{status.ram}, **CPU:** {status.cpu}, **Network:** {status.network}")
26+
if str(interaction.user.id) == OWNER_ID:
27+
await interaction.response.send_message("Reiniciando...")
28+
print(f"{interaction.user.id} me reiniciou!")
29+
await client.stop_app(SQUARE_APP_ID)

0 commit comments

Comments
 (0)