add list
This commit is contained in:
parent
7b19fa67e1
commit
c831c15610
1 changed files with 14 additions and 1 deletions
|
@ -117,6 +117,19 @@ async def execute(inter: disnake.AppCmdInter, command:str):
|
|||
response = "No Response"
|
||||
await inter.edit_original_response(content=f"Respose:\n```{response}```")
|
||||
|
||||
|
||||
@bot.slash_command(
|
||||
name="list",
|
||||
description="Lists the people on the server",
|
||||
)
|
||||
async def execute(inter: disnake.AppCmdInter):
|
||||
await inter.response.defer()
|
||||
with Client(os.getenv("RCON_IP"), int(os.getenv("RCON_PORT")), passwd=os.getenv("RCON_PASSWORD")) as client:
|
||||
response = client.run("list")
|
||||
if response == "":
|
||||
response = "No Response"
|
||||
await inter.edit_original_response(content=response)
|
||||
|
||||
@bot.slash_command(
|
||||
name="apply",
|
||||
description="Apply to join the server",
|
||||
|
@ -164,7 +177,7 @@ async def button_listener(inter: disnake.MessageInteraction):
|
|||
whitelistedrole = guild.get_role(int(os.getenv("WHITELISTED_ROLE_ID")))
|
||||
member = await guild.fetch_member(inter.user.id)
|
||||
if any(r in member.roles for r in (approle, whitelistedrole)):
|
||||
await inter.response.send_message("You have already applied, you many not apply again!", ephemeral=True)
|
||||
await inter.response.send_message("You have already applied, you may not apply again!", ephemeral=True)
|
||||
else:
|
||||
await inter.response.send_modal(modal=ApplicationModal())
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue