aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/info/source.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/exts/info/source.py')
-rw-r--r--bot/exts/info/source.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bot/exts/info/source.py b/bot/exts/info/source.py
index f79be36b0..7b41352d4 100644
--- a/bot/exts/info/source.py
+++ b/bot/exts/info/source.py
@@ -2,7 +2,7 @@ import inspect
from pathlib import Path
from typing import Optional, Tuple, Union
-from discord import Embed
+from discord import Embed, utils
from discord.ext import commands
from bot.bot import Bot
@@ -35,8 +35,10 @@ class SourceConverter(commands.Converter):
elif argument.lower() in tags_cog._cache:
return argument.lower()
+ escaped_arg = utils.escape_markdown(argument)
+
raise commands.BadArgument(
- f"Unable to convert `{argument}` to valid command{', tag,' if show_tag else ''} or Cog."
+ f"Unable to convert '{escaped_arg}' to valid command{', tag,' if show_tag else ''} or Cog."
)