aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar wookie184 <[email protected]>2021-09-01 12:49:50 +0100
committerGravatar wookie184 <[email protected]>2021-09-01 12:49:50 +0100
commita4351738cc074f42b60521c122e8712888c50498 (patch)
treeded4cb387c825583693816d122ac1848e8d3fdae
parentMerge pull request #835 from python-discord/discord-2.0 (diff)
Start and end codeblocks with newlines to avoid android rendering them inline
-rw-r--r--bot/exts/evergreen/emoji.py2
-rw-r--r--bot/exts/evergreen/error_handler.py4
-rw-r--r--bot/exts/evergreen/githubinfo.py2
-rw-r--r--bot/exts/evergreen/help.py2
-rw-r--r--bot/exts/halloween/hacktoberstats.py4
-rw-r--r--bot/exts/pride/pride_leader.py2
-rw-r--r--bot/exts/utils/extensions.py8
-rw-r--r--bot/exts/valentines/valentine_zodiac.py2
8 files changed, 13 insertions, 13 deletions
diff --git a/bot/exts/evergreen/emoji.py b/bot/exts/evergreen/emoji.py
index 11615214..3d2bf9cb 100644
--- a/bot/exts/evergreen/emoji.py
+++ b/bot/exts/evergreen/emoji.py
@@ -65,7 +65,7 @@ class Emojis(commands.Cog):
emoji_dict[emoji.name.split("_")[0]].append(emoji)
error_comp = ", ".join(emoji_dict)
- msg.append(f"These are the valid emoji categories:\n```{error_comp}```")
+ msg.append(f"These are the valid emoji categories:\n```\n{error_comp}\n```")
return embed, msg
@commands.group(name="emoji", invoke_without_command=True)
diff --git a/bot/exts/evergreen/error_handler.py b/bot/exts/evergreen/error_handler.py
index a280c725..1014f6b2 100644
--- a/bot/exts/evergreen/error_handler.py
+++ b/bot/exts/evergreen/error_handler.py
@@ -74,7 +74,7 @@ class CommandErrorHandler(commands.Cog):
if isinstance(error, commands.UserInputError):
self.revert_cooldown_counter(ctx.command, ctx.message)
- usage = f"```{ctx.prefix}{parent_command}{ctx.command} {ctx.command.signature}```"
+ usage = f"```\n{ctx.prefix}{parent_command}{ctx.command} {ctx.command.signature}\n```"
embed = self.error_embed(
f"Your input was invalid: {error}\n\nUsage:{usage}"
)
@@ -107,7 +107,7 @@ class CommandErrorHandler(commands.Cog):
self.revert_cooldown_counter(ctx.command, ctx.message)
embed = self.error_embed(
"The argument you provided was invalid: "
- f"{error}\n\nUsage:\n```{ctx.prefix}{parent_command}{ctx.command} {ctx.command.signature}```"
+ f"{error}\n\nUsage:\n```\n{ctx.prefix}{parent_command}{ctx.command} {ctx.command.signature}\n```"
)
await ctx.send(embed=embed)
return
diff --git a/bot/exts/evergreen/githubinfo.py b/bot/exts/evergreen/githubinfo.py
index d29f3aa9..bbc9061a 100644
--- a/bot/exts/evergreen/githubinfo.py
+++ b/bot/exts/evergreen/githubinfo.py
@@ -66,7 +66,7 @@ class GithubInfo(commands.Cog):
embed = discord.Embed(
title=f"`{user_data['login']}`'s GitHub profile info",
- description=f"```{user_data['bio']}```\n" if user_data["bio"] else "",
+ description=f"```\n{user_data['bio']}\n```\n" if user_data["bio"] else "",
colour=discord.Colour.blurple(),
url=user_data["html_url"],
timestamp=datetime.strptime(user_data["created_at"], "%Y-%m-%dT%H:%M:%SZ")
diff --git a/bot/exts/evergreen/help.py b/bot/exts/evergreen/help.py
index bfb5db17..0c0922d6 100644
--- a/bot/exts/evergreen/help.py
+++ b/bot/exts/evergreen/help.py
@@ -308,7 +308,7 @@ class HelpSession:
signature = self._get_command_params(self.query)
parent = self.query.full_parent_name + " " if self.query.parent else ""
- paginator.add_line(f"**```{prefix}{parent}{signature}```**")
+ paginator.add_line(f"**```\n{prefix}{parent}{signature}\n```**")
aliases = [f"`{alias}`" if not parent else f"`{parent} {alias}`" for alias in self.query.aliases]
aliases += [f"`{alias}`" for alias in getattr(self.query, "root_aliases", ())]
aliases = ", ".join(sorted(aliases))
diff --git a/bot/exts/halloween/hacktoberstats.py b/bot/exts/halloween/hacktoberstats.py
index 24106a5e..e7ba2f50 100644
--- a/bot/exts/halloween/hacktoberstats.py
+++ b/bot/exts/halloween/hacktoberstats.py
@@ -61,8 +61,8 @@ class HacktoberStats(commands.Cog):
else:
msg = (
f"{author_mention}, you have not linked a GitHub account\n\n"
- f"You can link your GitHub account using:\n```{ctx.prefix}hackstats link github_username```\n"
- f"Or query GitHub stats directly using:\n```{ctx.prefix}hackstats github_username```"
+ f"You can link your GitHub account using:\n```\n{ctx.prefix}hackstats link github_username\n```\n"
+ f"Or query GitHub stats directly using:\n```\n{ctx.prefix}hackstats github_username\n```"
)
await ctx.send(msg)
return
diff --git a/bot/exts/pride/pride_leader.py b/bot/exts/pride/pride_leader.py
index 8e88183b..8cfe0ebc 100644
--- a/bot/exts/pride/pride_leader.py
+++ b/bot/exts/pride/pride_leader.py
@@ -51,7 +51,7 @@ class PrideLeader(commands.Cog):
valid_names = "\n".join(valid_names)
error_msg = "Did you mean?"
- embed.description = f"{error_msg}\n```{valid_names}```"
+ embed.description = f"{error_msg}\n```\n{valid_names}\n```"
embed.set_footer(text="To add more pride leaders, feel free to open a pull request!")
return embed
diff --git a/bot/exts/utils/extensions.py b/bot/exts/utils/extensions.py
index a95def4e..2f72a302 100644
--- a/bot/exts/utils/extensions.py
+++ b/bot/exts/utils/extensions.py
@@ -60,7 +60,7 @@ class Extension(commands.Converter):
names = "\n".join(matches)
raise commands.BadArgument(
f":x: `{argument}` is an ambiguous extension name. "
- f"Please use one of the following fully-qualified names.```\n{names}```"
+ f"Please use one of the following fully-qualified names.```\n{names}\n```"
)
elif matches:
return matches[0]
@@ -110,7 +110,7 @@ class Extensions(commands.Cog):
blacklisted = "\n".join(UNLOAD_BLACKLIST & set(extensions))
if blacklisted:
- msg = f":x: The following extension(s) may not be unloaded:```{blacklisted}```"
+ msg = f":x: The following extension(s) may not be unloaded:```\n{blacklisted}\n```"
else:
if "*" in extensions or "**" in extensions:
extensions = set(self.bot.extensions.keys()) - UNLOAD_BLACKLIST
@@ -213,7 +213,7 @@ class Extensions(commands.Cog):
if failures:
failures = "\n".join(f"{ext}\n {err}" for ext, err in failures.items())
- msg += f"\nFailures:```{failures}```"
+ msg += f"\nFailures:```\n{failures}\n```"
log.debug(f"Batch {verb}ed extensions.")
@@ -240,7 +240,7 @@ class Extensions(commands.Cog):
log.exception(f"Extension '{ext}' failed to {verb}.")
error_msg = f"{e.__class__.__name__}: {e}"
- msg = f":x: Failed to {verb} extension `{ext}`:\n```{error_msg}```"
+ msg = f":x: Failed to {verb} extension `{ext}`:\n```\n{error_msg}\n```"
else:
msg = f":ok_hand: Extension successfully {verb}ed: `{ext}`."
log.debug(msg[10:])
diff --git a/bot/exts/valentines/valentine_zodiac.py b/bot/exts/valentines/valentine_zodiac.py
index d862ee63..2a9069b1 100644
--- a/bot/exts/valentines/valentine_zodiac.py
+++ b/bot/exts/valentines/valentine_zodiac.py
@@ -108,7 +108,7 @@ class ValentineZodiac(commands.Cog):
except ValueError as e:
final_embed = discord.Embed()
final_embed.color = Colours.soft_red
- final_embed.description = f"Zodiac sign could not be found because.\n```{e}```"
+ final_embed.description = f"Zodiac sign could not be found because.\n```\n{e}\n```"
log.info(f"Error in 'zodiac date' command:\n{e}.")
else:
final_embed = self.zodiac_build_embed(zodiac_sign_based_on_date)