Skip to content

Commit

Permalink
Run black
Browse files Browse the repository at this point in the history
  • Loading branch information
Mega-JC committed Jul 2, 2024
1 parent 46a9ff3 commit b6c7337
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
6 changes: 3 additions & 3 deletions pcbot/exts/bot_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ async def on_command(self, ctx: commands.Context[BotT]):
escaped_cmd_text = discord.utils.escape_markdown(ctx.message.content)

with io.StringIO(ctx.message.content) as log_buffer:
log_txt_file = discord.File(log_buffer, filename="command.txt") # type: ignore
log_txt_file = discord.File(log_buffer, filename="command.txt") # type: ignore

invocation_embed_dict = dict(
author=dict(
name=f"{ctx.author}",
icon_url= f"{ctx.author.avatar or ctx.author.default_avatar}",
icon_url=f"{ctx.author.avatar or ctx.author.default_avatar}",
),
description=escaped_cmd_text
if len(escaped_cmd_text) <= 4095
Expand Down
9 changes: 6 additions & 3 deletions pcbot/exts/helpforums_pre/cogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,6 @@ async def on_message_edit(self, before: discord.Message, after: discord.Message)
elif (
not caution_types
) and bad_help_thread_data_exists: # delete caution messages

bad_thread_data = await self.fetch_bad_help_thread_data(thread.id)

for msg_id in bad_thread_data["caution_message_ids"]:
Expand Down Expand Up @@ -899,7 +898,9 @@ async def on_raw_reaction_add(self, payload: discord.RawReactionActionEvent):
+ (
"the OP"
if by_op
else "an admin" if by_admin else "a Helpfulie"
else "an admin"
if by_admin
else "a Helpfulie"
)
+ " (via adding a ✅ reaction).",
applied_tags=new_tags,
Expand Down Expand Up @@ -987,7 +988,9 @@ async def on_raw_reaction_remove(self, payload: discord.RawReactionActionEvent):
+ (
"the OP"
if by_op
else "an admin" if by_admin else "a Helpfulie"
else "an admin"
if by_admin
else "a Helpfulie"
)
+ " (via removing a ✅ reaction).",
)
Expand Down
2 changes: 1 addition & 1 deletion pcbot/exts/helpforums_pre/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
INVALID_HELP_THREAD_TYPES = {
"thread_title_too_short",
"member_asking_for_help",
#"member_exclaiming_about_not_working_code",
# "member_exclaiming_about_not_working_code",
"member_asking_for_code",
"member_asking_about_problem_with_code",
"wrong_thread_help_topic_pygame",
Expand Down
2 changes: 1 addition & 1 deletion pcbot/exts/showcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ async def thread_triple(thread: discord.Thread):
+ (
f"{rank_emoji}: {thread_reactions_count}"
if rank_emoji
else f"{thread_reactions_count}: Unique | "
else f"{thread_reactions_count}: Unique | "
+ ", ".join(
f"{reaction.emoji}: {reaction.count}"
for reaction in starter_message.reactions
Expand Down
4 changes: 3 additions & 1 deletion pcbot/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,9 @@ async def initialize_pgcbots_db_schema(db: DatabaseDict, config: dict[str, Any])
+ (
"initial "
if is_initial_migration
else "automatic " if config.get("auto_migrate") else ""
else "automatic "
if config.get("auto_migrate")
else ""
)
+ "bot database migration..."
)
Expand Down

0 comments on commit b6c7337

Please sign in to comment.