From 94a4f312f2eb1db7933f214aa8ec476c305dadad Mon Sep 17 00:00:00 2001 From: ajax146 <31014239+ajax146@users.noreply.github.com> Date: Mon, 12 Feb 2024 08:42:03 -0500 Subject: [PATCH] Fix the 10 places with a stauts typo --- documentation/DevelopmentGuide.md | 2 +- techsupport_bot/commands/application.py | 16 ++++++++-------- techsupport_bot/core/databases.py | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/documentation/DevelopmentGuide.md b/documentation/DevelopmentGuide.md index 21137d9f8..0c623d65d 100644 --- a/documentation/DevelopmentGuide.md +++ b/documentation/DevelopmentGuide.md @@ -126,7 +126,7 @@ query = ( ) .where(self.bot.models.Applications.guild_id == str(member.guild.id)) .where( - self.bot.models.Applications.application_stauts + self.bot.models.Applications.application_status == ApplicationStatus.PENDING.value ) ) diff --git a/techsupport_bot/commands/application.py b/techsupport_bot/commands/application.py index b9faf317e..68c3dd6a4 100644 --- a/techsupport_bot/commands/application.py +++ b/techsupport_bot/commands/application.py @@ -336,7 +336,7 @@ async def approve_application( return await application.update( - application_stauts=ApplicationStatus.APPROVED.value + application_status=ApplicationStatus.APPROVED.value ).apply() await member.add_roles( @@ -375,7 +375,7 @@ async def deny_application( await interaction.response.send_message(embed=embed) return await application.update( - application_stauts=ApplicationStatus.DENIED.value + application_status=ApplicationStatus.DENIED.value ).apply() await self.notify_for_application_change( @@ -637,7 +637,7 @@ async def build_application_embed( if not new: embed.add_field( name="Status", - value=application.application_stauts, + value=application.application_status, inline=False, ) @@ -658,7 +658,7 @@ async def handle_new_application( guild_id=str(applicant.guild.id), applicant_name=applicant.name, applicant_id=str(applicant.id), - application_stauts=ApplicationStatus.PENDING.value, + application_status=ApplicationStatus.PENDING.value, background=background, reason=reason, ) @@ -833,7 +833,7 @@ async def get_applications_by_status( list[bot.models.Applications]: The list of applications in a oldest first order """ query = self.bot.models.Applications.query.where( - self.bot.models.Applications.application_stauts == status.value + self.bot.models.Applications.application_status == status.value ).where(self.bot.models.Applications.guild_id == str(guild.id)) entry = await query.gino.all() entry.sort(key=lambda entry: entry.application_time) @@ -856,7 +856,7 @@ async def search_for_pending_application( ) .where(self.bot.models.Applications.guild_id == str(member.guild.id)) .where( - self.bot.models.Applications.application_stauts + self.bot.models.Applications.application_status == ApplicationStatus.PENDING.value ) ) @@ -907,7 +907,7 @@ async def execute(self, config: munch.Munch, guild: discord.Guild) -> None: " they left" ) await app.update( - application_stauts=ApplicationStatus.REJECTED.value + application_status=ApplicationStatus.REJECTED.value ).apply() continue @@ -928,7 +928,7 @@ async def execute(self, config: munch.Munch, guild: discord.Guild) -> None: f" the `{role.name}` role" ) await app.update( - application_stauts=ApplicationStatus.APPROVED.value + application_status=ApplicationStatus.APPROVED.value ).apply() if audit_log: embed = discord.Embed(title="Application manage events") diff --git a/techsupport_bot/core/databases.py b/techsupport_bot/core/databases.py index 0b4202208..f7256020b 100644 --- a/techsupport_bot/core/databases.py +++ b/techsupport_bot/core/databases.py @@ -29,7 +29,7 @@ class Applications(bot.db.Model): guild_id = bot.db.Column(bot.db.String) applicant_name = bot.db.Column(bot.db.String) applicant_id = bot.db.Column(bot.db.String) - application_stauts = bot.db.Column(bot.db.String) + application_status = bot.db.Column(bot.db.String) background = bot.db.Column(bot.db.String) reason = bot.db.Column(bot.db.String) application_time = bot.db.Column(