fix(moderation): fixed broken on_submit
All checks were successful
Pylint / Pylint (push) Successful in 1m7s

This commit is contained in:
Seaswimmer 2023-09-25 00:02:57 -04:00
parent c251b2f29b
commit e9098c144b
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -53,7 +53,7 @@ class Moderation(commands.Cog):
address = discord.ui.TextInput(
label="Address",
placeholder="Input your MySQL address here.",
style=discord.TextStyle.paragraph,
style=discord.TextStyle.short,
required=False,
max_length=300
)
@ -96,7 +96,7 @@ class Moderation(commands.Cog):
message += f"- Password set to\n - `{trimmed_password}` - Trimmed for security\n"
if message == "":
trimmed_password = str(await self.config.mysql_password())[:8]
send = f"No changes were made.\nCurrent configuration:\n- Address:\n - `{await self.config.mysql_address()}`\n- Database:\n - `{await self.config.mysql_database}`\n- Username:\n - `{await self.config.mysql_username()}`\n- Password:\n - `{trimmed_password}` - Trimmed for security"
send = f"No changes were made.\nCurrent configuration:\n- Address:\n - `{await self.config.mysql_address()}`\n- Database:\n - `{await self.config.mysql_database()}`\n- Username:\n - `{await self.config.mysql_username()}`\n- Password:\n - `{trimmed_password}` - Trimmed for security"
else:
send = f"Configuration changed:\n{message}"
await interaction.response.send_message(send, ephemeral=True)