aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Soumitra Shewale <[email protected]>2020-10-02 17:52:52 +0530
committerGravatar Soumitra Shewale <[email protected]>2020-10-02 17:52:52 +0530
commit0d3d7822c84d798a639df0bde348a256977db08a (patch)
tree2777baa85a7a00d9e854d949a4563246c4cf2916
parentLinter (diff)
Get rid of codeblock in souce commit
Double backtick will break if argument contains a double backtick, so getting rid of the codeblock itself makes more sense in my opionion. Also fix the style issue with multiline string by storing the escaped arg in another variable
-rw-r--r--bot/exts/info/source.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bot/exts/info/source.py b/bot/exts/info/source.py
index f2412a8dd..7b41352d4 100644
--- a/bot/exts/info/source.py
+++ b/bot/exts/info/source.py
@@ -35,9 +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 `{utils.escape_markdown(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."
)