From 56fc1cea58d696c97b2eebc5e8e87dac9b857a8d Mon Sep 17 00:00:00 2001 From: insert Date: Tue, 14 May 2024 16:55:57 -0400 Subject: [PATCH] Don't limit execute to single person --- applicationbot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applicationbot.py b/applicationbot.py index 8122b72..bc85149 100644 --- a/applicationbot.py +++ b/applicationbot.py @@ -105,8 +105,8 @@ async def whitelist( ) async def execute(inter: disnake.AppCmdInter, command:str): await inter.response.defer() - if inter.user.id != int(os.getenv("ADMIN_ID")): - await inter.edit_original_response(content="Only the server admin may run this command") + if int(os.getenv("ADMIN_ROLE_ID") not in user.roles: + await inter.edit_original_response(content="Only the server admins may run this command") return with Client(os.getenv("RCON_IP"), int(os.getenv("RCON_PORT")), passwd=os.getenv("RCON_PASSWORD")) as client: response = client.run(command)