Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion documentation/DevelopmentGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
)
Expand Down
16 changes: 8 additions & 8 deletions techsupport_bot/commands/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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,
)

Expand All @@ -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,
)
Expand Down Expand Up @@ -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)
Expand All @@ -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
)
)
Expand Down Expand Up @@ -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

Expand All @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/core/databases.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down