maybe possibly fixed the "interaction failed" message
This commit is contained in:
parent
65e0a954ad
commit
0b262eed2b
1 changed files with 2 additions and 2 deletions
|
@ -116,7 +116,7 @@ class Pterodactyl(commands.Cog):
|
||||||
@discord.ui.button(label="Yes", style=discord.ButtonStyle.success)
|
@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):
|
||||||
requests.post(await self.get_url(interaction.guild, "power"), headers=headers, json={"signal": "stop"})
|
requests.post(await self.get_url(interaction.guild, "power"), headers=headers, json={"signal": "stop"})
|
||||||
await self.passed_info[5].edit("Server stopping...", view=None)
|
await interaction.response.edit_message("Server stopping...", view=None)
|
||||||
while True:
|
while True:
|
||||||
async with aiohttp.ClientSession() as session:
|
async with aiohttp.ClientSession() as session:
|
||||||
async with session.get(await Pterodactyl.get_url(interaction.guild, "resources"), headers=self.passed_info[2]) as response:
|
async with session.get(await Pterodactyl.get_url(interaction.guild, "resources"), headers=self.passed_info[2]) as response:
|
||||||
|
@ -162,7 +162,7 @@ class Pterodactyl(commands.Cog):
|
||||||
async def no_button(self, button:discord.ui.Button, interaction:discord.Interaction):
|
async def no_button(self, button:discord.ui.Button, interaction:discord.Interaction):
|
||||||
for button in self.children:
|
for button in self.children:
|
||||||
button.disabled = True
|
button.disabled = True
|
||||||
await self.passed_info[5].edit(content=f"Command cancelled.", view=self)
|
await interaction.response.edit_message(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