[CustomCom] Fixed KeyError on specific message edge-case (#2739)

fixes #2679
This commit is contained in:
DevilXD 2019-05-30 04:36:32 +02:00 committed by Michael H
parent aac9369f3f
commit f894b62bfe

View File

@ -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()