Update bad looking 'diff' code blocks with 'markdown' (#6152)

Co-authored-by: Jakub Kuczys <me@jacken.men>
This commit is contained in:
Ryan Ramboer 2023-05-13 12:21:27 -05:00 committed by GitHub
parent ecb60c0856
commit 6cd7a380f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 11 deletions

View File

@ -625,14 +625,14 @@ class Downloader(commands.Cog):
joined = _("There are no repos installed.")
else:
if len(repos) > 1:
joined = _("Installed Repos:\n\n")
joined = _("# Installed Repos\n")
else:
joined = _("Installed Repo:\n\n")
joined = _("# Installed Repo\n")
for repo in sorted_repos:
joined += "+ {}: {}\n".format(repo.name, repo.short or "")
for page in pagify(joined, ["\n"], shorten_by=16):
await ctx.send(box(page.lstrip(" "), lang="diff"))
await ctx.send(box(page.lstrip(" "), lang="markdown"))
@repo.command(name="info")
async def _repo_info(self, ctx: commands.Context, repo: Repo) -> None:
@ -1333,9 +1333,9 @@ class Downloader(commands.Cog):
)
if len(installed_cogs_in_repo) > 1:
installed_str = _("Installed Cogs:\n{text}").format(text=installed_str)
installed_str = _("# Installed Cogs\n{text}").format(text=installed_str)
elif installed_cogs_in_repo:
installed_str = _("Installed Cog:\n{text}").format(text=installed_str)
installed_str = _("# Installed Cog\n{text}").format(text=installed_str)
available_cogs = [
cog for cog in repo.available_cogs if not (cog.hidden or cog in installed_cogs_in_repo)
@ -1346,14 +1346,14 @@ class Downloader(commands.Cog):
)
if not available_str:
cogs = _("Available Cogs:\nNo cogs are available.")
cogs = _("> Available Cogs\nNo cogs are available.")
elif len(available_cogs) > 1:
cogs = _("Available Cogs:\n{text}").format(text=available_str)
cogs = _("> Available Cogs\n{text}").format(text=available_str)
else:
cogs = _("Available Cog:\n{text}").format(text=available_str)
cogs = _("> Available Cog\n{text}").format(text=available_str)
cogs = cogs + "\n\n" + installed_str
for page in pagify(cogs, ["\n"], shorten_by=16):
await ctx.send(box(page.lstrip(" "), lang="diff"))
await ctx.send(box(page.lstrip(" "), lang="markdown"))
@cog.command(name="info", usage="<repo> <cog>")
async def _cog_info(self, ctx: commands.Context, repo: Repo, cog_name: str) -> None:

View File

@ -279,10 +279,10 @@ class TriviaSession:
async def send_table(self):
"""Send a table of scores to the session's channel."""
table = "+ Results: \n\n"
table = "Results:\n\n"
for user, score in self.scores.most_common():
table += "+ {}\t{}\n".format(user, score)
await self.ctx.send(box(table, lang="diff"))
await self.ctx.send(box(table, lang="markdown"))
def stop(self):
"""Stop the trivia session, without showing scores."""