Skip to content

Commit

Permalink
Add links to the output of [p]repo list (#6284)
Browse files Browse the repository at this point in the history
Co-authored-by: Seaswimmer <[email protected]>
Co-authored-by: Kreusada <[email protected]>
  • Loading branch information
3 people authored Oct 29, 2024
1 parent 4134881 commit 30058c0
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions redbot/cogs/downloader/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,14 +648,18 @@ async def _repo_list(self, ctx: commands.Context) -> None:
joined = _("There are no repos installed.")
else:
if len(repos) > 1:
joined = _("# Installed Repos\n")
joined = _("## Installed Repos\n")
else:
joined = _("# Installed Repo\n")
joined = _("## Installed Repo\n")
for repo in sorted_repos:
joined += "+ {}: {}\n".format(repo.name, repo.short or "")
joined += "- **{}:** {}\n - {}\n".format(
repo.name,
repo.short or "",
"<{}>".format(repo.url),
)

for page in pagify(joined, ["\n"], shorten_by=16):
await ctx.send(box(page.lstrip(" "), lang="markdown"))
await ctx.send(page)

@repo.command(name="info")
async def _repo_info(self, ctx: commands.Context, repo: Repo) -> None:
Expand Down

0 comments on commit 30058c0

Please sign in to comment.