Skip to content

Commit

Permalink
fix: Unterminated string literals formatted properly
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixpereira committed Aug 19, 2024
1 parent a868a41 commit a9d5149
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions src/commands/skullboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@ async def edit_or_send_skullboard_message(
format_type = str(message.stickers[0].format).split(".", maxsplit=1)[-1]

sticker_id = message.stickers[0].id
sticker_url = f"https://media.discordapp.net/stickers/{
sticker_id}.{format_type}"
sticker_url = (
f"https://media.discordapp.net/stickers/{sticker_id}.{format_type}"
)
embed.set_image(url=sticker_url)

if message.attachments:
Expand Down Expand Up @@ -250,12 +251,10 @@ async def wrapper(self, interaction: Interaction, *args, **kwargs):
except Exception as e:
# Log the exception and send an error message to the user
logging.exception(
f"User {interaction.user.name} triggered an error in {
func.__name__} with args: {args} and kwargs: {kwargs}"
f"User {interaction.user.name} triggered an error in {func.__name__} with args: {args} and kwargs: {kwargs}"
)
await interaction.followup.send(
f"Error:\nEither no data was available for this command, or a serious error occurred.\nType: {
str(e)}",
f"Error:\nEither no data was available for this command, or a serious error occurred.\nType: {str(e)}",
ephemeral=True,
)

Expand Down Expand Up @@ -323,8 +322,7 @@ async def hof(self, interaction: Interaction) -> Response:
# The post date is unused, may use in future if needed.
for post_id, user_id, channel_id, day, frequency in hof_entries[:10]:
# Format the HoF entries into a readable message
line = f"πŸ’€ {frequency} : https://discord.com/channels/{
self.db.guild_id}/{channel_id}/{post_id} from <@{user_id}>"
line = f"πŸ’€ {frequency} : https://discord.com/channels/{self.db.guild_id}/{channel_id}/{post_id} from <@{user_id}>"
msg.append(line)

msg = "\n".join(msg)
Expand Down Expand Up @@ -354,8 +352,7 @@ async def week(self, interaction: Interaction) -> Response:
# The post date is unused, may use in future if needed.
for post_id, user_id, channel_id, day, frequency in hof_entries[:10]:
# Format the entries into a readable message
line = f"πŸ’€ {frequency} : https://discord.com/channels/{
self.db.guild_id}/{channel_id}/{post_id} from <@{user_id}>"
line = f"πŸ’€ {frequency} : https://discord.com/channels/{self.db.guild_id}/{channel_id}/{post_id} from <@{user_id}>"
msg.append(line)

msg = "\n".join(msg)
Expand Down Expand Up @@ -486,8 +483,7 @@ async def user(self, interaction: Interaction, member: Member) -> Response:
msg = [
f"### {title}:",
f"Skullboard Posts: **{user_skull_count}**",
f"Percentile: {
above_count}/{count} = **Top {percentile}% of Users**",
f"Percentile: {above_count}/{count} = **Top {percentile}% of Users**",
]
msg = "\n".join(msg)

Expand Down

0 comments on commit a9d5149

Please sign in to comment.