Skip to content

Commit

Permalink
Merge pull request #846 from Creatrix-Net/deepsource-transform-a2a80077
Browse files Browse the repository at this point in the history
style: format code with Black
  • Loading branch information
Dhruvacube authored Nov 22, 2024
2 parents 5210a12 + 8ed0639 commit 6de0331
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions minato_namikaze/old_outdated/raid.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,16 @@ async def raid(self, ctx: Context):
if guild_dict is None:
fmt = "Raid Mode: off\nBroadcast Channel: None"
else:
ch = f"<#{guild_dict['broadcast_channel']}>" if guild_dict["broadcast_channel"] else None
mode = RaidMode(guild_dict["raid_mode"]) if guild_dict["raid_mode"] is not None else RaidMode.off
ch = (
f"<#{guild_dict['broadcast_channel']}>"
if guild_dict["broadcast_channel"]
else None
)
mode = (
RaidMode(guild_dict["raid_mode"])
if guild_dict["raid_mode"] is not None
else RaidMode.off
)
fmt = f"Raid Mode: {mode.name.capitalize()}\nBroadcast Channel: {ch}"

await ctx.send(fmt)
Expand Down Expand Up @@ -473,7 +481,12 @@ async def mentionspam(self, ctx: Context, count: int | None = None):
"This server has not set up mention spam banning.",
)

ignores = ", ".join(f"<#{e}>" for e in guild_dict.get("safe_mention_channel_ids", [])) or "None"
ignores = (
", ".join(
f"<#{e}>" for e in guild_dict.get("safe_mention_channel_ids", [])
)
or "None"
)
return await ctx.send(
f'- Threshold: {guild_dict["mention_count"]} mentions\n- Ignored Channels: {ignores}',
)
Expand Down

0 comments on commit 6de0331

Please sign in to comment.