testing a change to the no button in update
This commit is contained in:
parent
a7c7a8e17c
commit
e190b613ba
1 changed files with 5 additions and 3 deletions
|
@ -113,7 +113,7 @@ class Pterodactyl(commands.Cog):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.passed_info = passed_info
|
self.passed_info = passed_info
|
||||||
|
|
||||||
@discord.ui.button(label="Yes", style=discord.ButtonStyle.green, emoji="✅")
|
@discord.ui.button(label="Yes", style=discord.ButtonStyle.success)
|
||||||
async def yes_button(self, button:discord.ui.Button, interaction:discord.Interaction):
|
async def yes_button(self, button:discord.ui.Button, interaction:discord.Interaction):
|
||||||
await self.passed_info[5].edit("Server stopping...")
|
await self.passed_info[5].edit("Server stopping...")
|
||||||
while True:
|
while True:
|
||||||
|
@ -158,9 +158,11 @@ class Pterodactyl(commands.Cog):
|
||||||
await asyncio.sleep(1)
|
await asyncio.sleep(1)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@discord.ui.button(label="No", style=discord.ButtonStyle.red, emoji="❌")
|
@discord.ui.button(label="No", style=discord.ButtonStyle.danger)
|
||||||
async def no_button(self, button:discord.ui.Button, interaction:discord.Interaction):
|
async def no_button(self, button:discord.ui.Button, interaction:discord.Interaction):
|
||||||
await self.passed_info[5].edit(content=f"Command cancelled.")
|
for button in self.children:
|
||||||
|
button.disabled = True
|
||||||
|
await self.passed_info[5].edit(content=f"Command cancelled.", view=self)
|
||||||
|
|
||||||
@app_commands.command()
|
@app_commands.command()
|
||||||
async def test(self, interaction: discord.Interaction, endpoint: str = None):
|
async def test(self, interaction: discord.Interaction, endpoint: str = None):
|
||||||
|
|
Reference in a new issue