more changes woo
This commit is contained in:
parent
75eef36874
commit
f678595016
1 changed files with 41 additions and 41 deletions
|
@ -42,7 +42,7 @@ class Pterodactyl(commands.Cog):
|
||||||
@app_commands.command()
|
@app_commands.command()
|
||||||
async def config(self, interaction: discord.Interaction):
|
async def config(self, interaction: discord.Interaction):
|
||||||
"""Configures the Pterodactyl cog."""
|
"""Configures the Pterodactyl cog."""
|
||||||
await interaction.response.send_modal(ConfigModal(interaction.guild))
|
await interaction.response.send_modal(self.ConfigModal(interaction.guild))
|
||||||
|
|
||||||
class ConfigModal(discord.ui.Modal, title="Pterodactyl Manager Configuration"):
|
class ConfigModal(discord.ui.Modal, title="Pterodactyl Manager Configuration"):
|
||||||
def __init__(self, guild: discord.guild):
|
def __init__(self, guild: discord.guild):
|
||||||
|
@ -71,7 +71,7 @@ class ConfigModal(discord.ui.Modal, title="Pterodactyl Manager Configuration"):
|
||||||
)
|
)
|
||||||
|
|
||||||
async def on_submit(self, interaction: discord.Interaction):
|
async def on_submit(self, interaction: discord.Interaction):
|
||||||
config_list = [await Pterodactyl.config.guild(ConfigModal.guild).base_url(), await Pterodactyl.config.guild(ConfigModal.guild).api_key(), await Pterodactyl.config.guild(ConfigModal.guild).server_id()]
|
config_list = [await Pterodactyl.config.guild(interaction.guild).base_url(), await Pterodactyl.config.guild(interaction.guild).api_key(), await Pterodactyl.config.guild(interaction.guild).server_id()]
|
||||||
message = ""
|
message = ""
|
||||||
if self.base_url.value != "":
|
if self.base_url.value != "":
|
||||||
config_list[0].set(self.base_url)
|
config_list[0].set(self.base_url)
|
||||||
|
|
Reference in a new issue