diff options
-rw-r--r-- | bot/exts/info/doc/_cog.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/bot/exts/info/doc/_cog.py b/bot/exts/info/doc/_cog.py index df076f162..16baa6320 100644 --- a/bot/exts/info/doc/_cog.py +++ b/bot/exts/info/doc/_cog.py @@ -244,8 +244,18 @@ class DocCog(commands.Cog): symbol_info = self.doc_symbols.get(symbol) if symbol_info is None: - log.debug("Symbol does not exist.") - return None + if symbol.count(" "): + # If an invalid symbol contains a space, check if the command was invoked + # in the format !d <symbol> <message> + symbol = symbol.split(" ", maxsplit=1)[0] + symbol_info = self.doc_symbols.get(symbol) + if symbol_info is None: + log.debug("Symbol does not exist.") + return None + else: + log.debug("Symbol does not exist.") + return None + self.bot.stats.incr(f"doc_fetches.{symbol_info.package}") with self.symbol_get_event: |