mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 11:48:55 -05:00
[CustomCom] Fixed KeyError on specific message edge-case (#2739)
fixes #2679
This commit is contained in:
parent
aac9369f3f
commit
f894b62bfe
@ -84,6 +84,8 @@ class CommandObj:
|
|||||||
return "{:%d/%m/%Y %H:%M:%S}".format(datetime.utcnow())
|
return "{:%d/%m/%Y %H:%M:%S}".format(datetime.utcnow())
|
||||||
|
|
||||||
async def get(self, message: discord.Message, command: str) -> Tuple[str, Dict]:
|
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)
|
ccinfo = await self.db(message.guild).commands.get_raw(command, default=None)
|
||||||
if not ccinfo:
|
if not ccinfo:
|
||||||
raise NotFound()
|
raise NotFound()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user