Skip to content

Commit

Permalink
Minor style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
49Indium committed Nov 21, 2023
1 parent 9a98365 commit a337198
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions uqcsbot/advent.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ async def register_command(self, interaction: discord.Interaction, aoc_name: str
if query is not None:
discord_user = self.bot.uqcs_server.get_member(query.discord_userid)
if discord_user:
discord_ping = discord_user.mention
discord_ping = discord_user.mention
else:
discord_ping = f"someone who doesn't seem to be in the server (discord id = {query.discord_userid})"
await interaction.edit_original_response(
Expand Down Expand Up @@ -661,7 +661,7 @@ async def register_admin_command(
if query is not None:
discord_user = self.bot.uqcs_server.get_member(query.discord_userid)
if discord_user:
discord_ping = discord_user.mention
discord_ping = discord_user.mention
else:
discord_ping = f"someone who doesn't seem to be in the server (discord id = {query.discord_userid})"
await interaction.edit_original_response(
Expand All @@ -679,7 +679,7 @@ async def register_admin_command(

discord_user = self.bot.uqcs_server.get_member(discord_id)
if discord_user:
discord_ping = discord_user.mention
discord_ping = discord_user.mention
else:
discord_ping = f"someone who doesn't seem to be in the server (discord id = {discord_id})"
await interaction.edit_original_response(
Expand Down Expand Up @@ -744,7 +744,9 @@ async def unregister_admin_command(
if discord_user:
discord_ping = discord_user.mention
else:
discord_ping = f"who does not seem to be in the server; id = {discord_id}"
discord_ping = (
f"who does not seem to be in the server; id = {discord_id}"
)
await interaction.edit_original_response(
content=f"This discord account ({discord_ping}) is already unregistered for this year. Ensure that you enter the users discord id, not discord name or nickname."
)
Expand All @@ -757,7 +759,9 @@ async def unregister_admin_command(
if discord_user:
discord_ping = discord_user.mention
else:
discord_ping = f"A user who does not seem to be in the server (id = {discord_id})"
discord_ping = (
f"A user who does not seem to be in the server (id = {discord_id})"
)
await interaction.edit_original_response(
content=f"{discord_ping} is no longer registered to win Advent of Code prizes for {year}."
)
Expand Down Expand Up @@ -925,7 +929,9 @@ async def add_winners_command(
winners_message = ""
for i, winner in enumerate(distinct_winners):
discord_id = winner.get_discord_userid(self.bot)
discord_user = self.bot.uqcs_server.get_member(discord_id) if discord_id else None
discord_user = (
self.bot.uqcs_server.get_member(discord_id) if discord_id else None
)
discord_ping = f" ({discord_user.mention})" if discord_user else ""
number_of_prizes = len(
[member for member in winners if member.id == winner.id]
Expand Down

0 comments on commit a337198

Please sign in to comment.