Skip to content

Commit ae1caf5

Browse files
committed
fix black styling
1 parent 87c88df commit ae1caf5

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

redbot/core/core_commands.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6017,7 +6017,7 @@ async def credits(self, ctx):
60176017
repo_cog = self.bot.get_cog("Downloader")
60186018
if not repo_cog:
60196019
return await ctx.send("My owner needs to load another plugin before I can continue.")
6020-
6020+
60216021
# Create base embed
60226022
embed = discord.Embed(
60236023
title=f"{self.bot.user.name}'s Code Credits",
@@ -6032,7 +6032,7 @@ async def credits(self, ctx):
60326032
"(https://github.com/Cog-Creators/Red-DiscordBot/graphs/contributors).",
60336033
inline=False,
60346034
)
6035-
6035+
60366036
# Get third-party modules
60376037
used_repos = {c.repo_name for c in await repo_cog.installed_cogs()}
60386038
cogs_credits = [
@@ -6044,9 +6044,11 @@ async def credits(self, ctx):
60446044
cogs_credits = list(set(cogs_credits))
60456045
cogs_credits = sorted(cogs_credits, key=lambda x: x[1].lower())
60466046
cogs_credits_text = "\n".join(cogs_credits)
6047-
6047+
60486048
# Check if we can fit everything in one embed
6049-
if len(cogs_credits_text) <= 1000: # Leave room for embed overhead and stay under 1024 field limit
6049+
if (
6050+
len(cogs_credits_text) <= 1000
6051+
): # Leave room for embed overhead and stay under 1024 field limit
60506052
embed.add_field(
60516053
name="Third-party modules and their creators",
60526054
value=cogs_credits_text,
@@ -6057,15 +6059,15 @@ async def credits(self, ctx):
60576059
# Use pagination for large lists - Discord field value limit is 1024
60586060
pages = list(pagify(cogs_credits_text, page_length=1000))
60596061
embeds = []
6060-
6062+
60616063
for i, page in enumerate(pages):
60626064
page_embed = discord.Embed(
60636065
title=f"{self.bot.user.name}'s Code Credits (Page {i+1}/{len(pages)})",
60646066
timestamp=self.bot.user.created_at,
60656067
)
60666068
page_embed.set_footer(text=f"{self.bot.user.name}'s birthday is")
60676069
page_embed.set_thumbnail(url=ctx.me.avatar.url)
6068-
6070+
60696071
if i == 0:
60706072
# First page includes the main description
60716073
page_embed.add_field(
@@ -6075,13 +6077,13 @@ async def credits(self, ctx):
60756077
"(https://github.com/Cog-Creators/Red-DiscordBot/graphs/contributors).",
60766078
inline=False,
60776079
)
6078-
6080+
60796081
page_embed.add_field(
60806082
name="Third-party modules and their creators",
60816083
value=page,
60826084
inline=False,
60836085
)
60846086
embeds.append(page_embed)
6085-
6087+
60866088
# Use menu system for pagination
60876089
await menu(ctx, embeds, timeout=180)

0 commit comments

Comments
 (0)