Skip to content

Commit

Permalink
Fix bug where info command error handling wasn't fully updated after …
Browse files Browse the repository at this point in the history
…the SQL query changed

Error handling needed to change as we can no longer tell the difference between no account and no lives
  • Loading branch information
connorhsm committed Jun 15, 2024
1 parent f610585 commit ec51749
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions dictator/cogs/informational.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,9 @@ async def info(self, interaction: discord.Interaction, discord_user: discord.Use
)
user_info = db.fetchone()

# No account found for user
if not user_info:
embed = discord.Embed(
title=f"No results for the user '{discord_user.mention}'.", colour=0xFFBB35
)
await interaction.followup.send(embed=embed, ephemeral=True)
return

# User hasn't lived any lives
if user_info[0] == 0:
embed = discord.Embed(
title=f"'{discord_user.name}' (or {user_info[0]}) has not lived any lives yet.",
colour=0xFFBB35,
title=f"'{discord_user.name}' either has not lived any lives yet or does not have an account.", colour=0xFFBB35
)
await interaction.followup.send(embed=embed, ephemeral=True)
return
Expand Down

0 comments on commit ec51749

Please sign in to comment.