move defer before blacklist check
All checks were successful
Build and Push Docker Image / build (push) Successful in 22s
All checks were successful
Build and Push Docker Image / build (push) Successful in 22s
This commit is contained in:
parent
82d2eb6ed2
commit
c09acbe9e3
@ -59,17 +59,13 @@ class CommandCog(commands.Cog):
|
|||||||
)
|
)
|
||||||
|
|
||||||
async def send_rcon_response(self, inter: Interaction, command: str) -> str:
|
async def send_rcon_response(self, inter: Interaction, command: str) -> str:
|
||||||
# if inter.user.id != 377453890523627522:
|
await inter.response.defer()
|
||||||
# log.warning("Bad user tried to send rcon command: '%s', '%s'", inter.user.name, command)
|
|
||||||
# await inter.response.send_message("Permissions Error", ephemeral=True)
|
|
||||||
# return
|
|
||||||
|
|
||||||
if command in COMMANDS_BLACKLIST:
|
if command in COMMANDS_BLACKLIST:
|
||||||
log.warning("Attempt to use banned command: '%s', '%s'", inter.user.name, command)
|
log.warning("Attempt to use banned command: '%s', '%s'", inter.user.name, command)
|
||||||
await inter.response.send_message("Blacklisted command", ephemeral=True)
|
await inter.followup.send("Blacklisted command")
|
||||||
return
|
return
|
||||||
|
|
||||||
await inter.response.defer()
|
|
||||||
response = await rcon(command, **self.bot.rcon_details)
|
response = await rcon(command, **self.bot.rcon_details)
|
||||||
await inter.followup.send(content=response)
|
await inter.followup.send(content=response)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user