🐛 fix USER bug

This commit is contained in:
synodriver 2021-09-09 23:02:05 +08:00 committed by Jigsaw
parent b6ec81c21d
commit 12c1f6d764

View File

@ -141,8 +141,8 @@ def USER(*user: str, perm: Optional[Permission] = None):
"""
async def _user(bot: "Bot", event: "Event") -> bool:
return bool(event.get_session_id() in user and perm and
await perm(bot, event))
return bool(event.get_session_id() in user and (perm is None or
await perm(bot, event)))
return Permission(_user)