Skip to content

Commit 57108e4

Browse files
authored
Restrict performance command to owner only
1 parent da64d1b commit 57108e4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

command/dev/performance.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020

2121
@bot.tree.command(name="performance", description="[Dev] Veja a performance da LuaBot!")
2222
async def performance(interaction: discord.Interaction):
23-
if not OWNER_ID:
24-
await interaction.response.send_message("Tá querendo ver se eu tô funcionando?")
25-
else:
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:
2626
status = await client.app_status(SQUARE_APP_ID) # StatusData(...)
2727

28-
await interaction.response.send_message(f"Performance: **RAM:**{status.ram}, **CPU:** {status.cpu}, **Network:** {status.network}")
28+
await interaction.response.send_message(f"Performance: **RAM:**{status.ram}, **CPU:** {status.cpu}, **Network:** {status.network}")

0 commit comments

Comments
 (0)