fix: removed self argument from get_url

This commit is contained in:
Seaswimmer 2023-07-15 23:40:32 -04:00
parent 2f8146d4f4
commit 453a512f0c
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -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, self.passed_info['interaction_context'].guild, "power"), headers=self.passed_info['headers'], json={"signal": "stop"}) requests.post(await Pterodactyl.get_url(self.passed_info['interaction_context'].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: