From cbd972cb26ae8fb23a1a70448b0ae48ed08d894b Mon Sep 17 00:00:00 2001 From: Soumitra Shewale Date: Fri, 2 Oct 2020 00:49:29 +0530 Subject: Escape markdown in faulty source commands Closes #1177 --- bot/exts/info/source.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/exts/info/source.py b/bot/exts/info/source.py index f79be36b0..7746e0c67 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 @@ -36,7 +36,7 @@ class SourceConverter(commands.Converter): return argument.lower() raise commands.BadArgument( - f"Unable to convert `{argument}` to valid command{', tag,' if show_tag else ''} or Cog." + f"Unable to convert `{utils.escape_markdown(argument)}` to valid command{', tag,' if show_tag else ''} or Cog." ) -- cgit v1.2.3