fix: please work i swear to god
This commit is contained in:
parent
453a512f0c
commit
bc15baa2de
1 changed files with 2 additions and 2 deletions
|
@ -111,7 +111,7 @@ class Pterodactyl(commands.Cog):
|
||||||
"updater_startup_vars": updater_startup_vars,
|
"updater_startup_vars": updater_startup_vars,
|
||||||
"old_startup_vars": old_startup_vars,
|
"old_startup_vars": old_startup_vars,
|
||||||
"interaction": interaction,
|
"interaction": interaction,
|
||||||
"interaction_context": await commands.Context.from_interaction(interaction),
|
"guild": interaction.guild,
|
||||||
}
|
}
|
||||||
await interaction_message.edit(content="The server is already running! Are you sure you'd like to stop the server for updates?", view=self.UpdateButtons(timeout=180, passed_info=passed_info))
|
await interaction_message.edit(content="The server is already running! Are you sure you'd like to stop the server for updates?", view=self.UpdateButtons(timeout=180, passed_info=passed_info))
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ class Pterodactyl(commands.Cog):
|
||||||
|
|
||||||
@ui.button(label="Yes", style=discord.ButtonStyle.success)
|
@ui.button(label="Yes", style=discord.ButtonStyle.success)
|
||||||
async def yes_button(self, button:ui.Button, interaction:discord.Interaction):
|
async def yes_button(self, button:ui.Button, interaction:discord.Interaction):
|
||||||
requests.post(await Pterodactyl.get_url(self.passed_info['interaction_context'].guild, "power"), headers=self.passed_info['headers'], json={"signal": "stop"})
|
requests.post(await Pterodactyl.get_url(self.passed_info['guild'], "power"), headers=self.passed_info['headers'], json={"signal": "stop"})
|
||||||
await self.passed_info['interaction'].edit_original_response("Server stopping...", view=None)
|
await self.passed_info['interaction'].edit_original_response("Server stopping...", view=None)
|
||||||
while True:
|
while True:
|
||||||
async with aiohttp.ClientSession() as session:
|
async with aiohttp.ClientSession() as session:
|
||||||
|
|
Reference in a new issue