From f894b62bfeba5d73c941cdaf4f412c457b35b0ac Mon Sep 17 00:00:00 2001 From: DevilXD Date: Thu, 30 May 2019 04:36:32 +0200 Subject: [PATCH] [CustomCom] Fixed KeyError on specific message edge-case (#2739) fixes #2679 --- redbot/cogs/customcom/customcom.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/redbot/cogs/customcom/customcom.py b/redbot/cogs/customcom/customcom.py index a4a0bf005..8d3faae8e 100644 --- a/redbot/cogs/customcom/customcom.py +++ b/redbot/cogs/customcom/customcom.py @@ -84,6 +84,8 @@ class CommandObj: return "{:%d/%m/%Y %H:%M:%S}".format(datetime.utcnow()) async def get(self, message: discord.Message, command: str) -> Tuple[str, Dict]: + if not command: + raise NotFound() ccinfo = await self.db(message.guild).commands.get_raw(command, default=None) if not ccinfo: raise NotFound()