🐛 fix args_parser: dont ignore if exists

This commit is contained in:
yanyongyu 2020-09-22 11:28:38 +08:00
parent 342d879add
commit e68ce8b3a9

View File

@ -6,8 +6,8 @@ import typing
import inspect
from functools import wraps
from datetime import datetime
from contextvars import ContextVar
from collections import defaultdict
from contextvars import Context, ContextVar, copy_context
from nonebot.rule import Rule
from nonebot.permission import Permission, USER
@ -166,8 +166,8 @@ class Matcher(metaclass=MatcherMeta):
raise PausedException
async def _key_parser(bot: Bot, event: Event, state: dict):
if key in state:
return
# if key in state:
# return
parser = args_parser or cls._default_parser
if parser:
await parser(bot, event, state)
@ -252,6 +252,7 @@ class Matcher(metaclass=MatcherMeta):
temp=True,
priority=0,
block=True,
module=self.module,
default_state=self.state,
expire_time=datetime.now() + bot.config.session_expire_timeout)
except PausedException:
@ -263,6 +264,7 @@ class Matcher(metaclass=MatcherMeta):
temp=True,
priority=0,
block=True,
module=self.module,
default_state=self.state,
expire_time=datetime.now() + bot.config.session_expire_timeout)
except FinishedException: