Skip to content

Commit 276060e

Browse files
authored
Refactor shutdown command for owner verification
1 parent 86cb5ba commit 276060e

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

command/dev/shutdown.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121

2222
@bot.tree.command(name="shutdown", description="[Dev] Para o processo de execução da LuaBot")
2323
async def shutdown(interaction: discord.Interaction):
24-
if not OWNER_ID:
25-
await interaction.response.send_message("Tá querendo me desligar é? **Você não tem permissão para me desativar!**")
26-
else:
27-
await client.stop_app(SQUARE_APP_ID)
28-
print("Adeus Mundo Cruel")
24+
if str(interaction.user.id) != OWNER_ID:
25+
await interaction.response.send_message( "Tá querendo me desligar é? **Você não tem permissão para me desativar!**" )
26+
27+
if str(interaction.user.id) == OWNER_ID:
28+
await interaction.response.send_message("Desligando...")
29+
print(f"{interaction.user.id} me desligou!")
30+
await client.stop_app(SQUARE_APP_ID)

0 commit comments

Comments
 (0)