Compare commits
No commits in common. "0b262eed2bde4e4345bc242b59db0e50fa88b734" and "e190b613ba519a30be7001082e5544ccdf8f772d" have entirely different histories.
0b262eed2b
...
e190b613ba
1 changed files with 4 additions and 4 deletions
|
@ -115,8 +115,7 @@ class Pterodactyl(commands.Cog):
|
|||
|
||||
@discord.ui.button(label="Yes", style=discord.ButtonStyle.success)
|
||||
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"})
|
||||
await interaction.response.edit_message("Server stopping...", view=None)
|
||||
await self.passed_info[5].edit("Server stopping...")
|
||||
while True:
|
||||
async with aiohttp.ClientSession() as session:
|
||||
async with session.get(await Pterodactyl.get_url(interaction.guild, "resources"), headers=self.passed_info[2]) as response:
|
||||
|
@ -125,8 +124,9 @@ class Pterodactyl(commands.Cog):
|
|||
await self.passed_info[5].edit("Server stopped!")
|
||||
break
|
||||
else:
|
||||
await asyncio.sleep(2)
|
||||
await asyncio.sleep(1)
|
||||
continue
|
||||
requests.post(await Pterodactyl.get_url(interaction.guild, "power"), headers=self.passed_info[2], json={"signal": "stop"})
|
||||
for data in self.passed_info[3]:
|
||||
await Pterodactyl.put(await Pterodactyl.get_url(interaction.guild, "startup/variable"), self.passed_info[2], data)
|
||||
requests.post(await Pterodactyl.get_url(interaction.guild, "power"), headers=self.passed_info[2], json={"signal": "start"})
|
||||
|
@ -162,7 +162,7 @@ class Pterodactyl(commands.Cog):
|
|||
async def no_button(self, button:discord.ui.Button, interaction:discord.Interaction):
|
||||
for button in self.children:
|
||||
button.disabled = True
|
||||
await interaction.response.edit_message(content=f"Command cancelled.", view=self)
|
||||
await self.passed_info[5].edit(content=f"Command cancelled.", view=self)
|
||||
|
||||
@app_commands.command()
|
||||
async def test(self, interaction: discord.Interaction, endpoint: str = None):
|
||||
|
|
Reference in a new issue