fix: fixed error handling if startup args not set

This commit is contained in:
Seaswimmer 2023-07-16 13:09:15 -04:00
parent 5c81426885
commit b81615e6b6
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -62,7 +62,7 @@ class Pterodactyl(commands.Cog):
await interaction_message.edit(f"Something went wrong.\nError: `Startup jar not set.`", ephemeral=True) await interaction_message.edit(f"Something went wrong.\nError: `Startup jar not set.`", ephemeral=True)
raise LookupError("Startup jar not set.") raise LookupError("Startup jar not set.")
elif await self.config.guild(interaction.guild).startup_arguments() is None: elif await self.config.guild(interaction.guild).startup_arguments() is None:
await interaction.response.send_message(f"Something went wrong.\nError: `Startup arguments not set.`", ephemeral=True) await interaction_message.edit(f"Something went wrong.\nError: `Startup arguments not set.`", ephemeral=True)
raise LookupError("Startup arguments not set.") raise LookupError("Startup arguments not set.")
else: else:
api_key = await self.config.guild(interaction.guild).api_key() api_key = await self.config.guild(interaction.guild).api_key()