🔀 Merge pull request #676

Fix: fix matcher receive and arg detect
This commit is contained in:
Ju4tCode 2022-01-09 20:45:19 +08:00 committed by GitHub
commit d549087db2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -425,7 +425,7 @@ class Matcher(metaclass=MatcherMeta):
if matcher.get_target() == RECEIVE_KEY.format(id=id):
matcher.set_receive(id, event)
return
if matcher.get_receive(id):
if matcher.get_receive(id, ...) is not ...:
return
await matcher.reject()
@ -469,7 +469,7 @@ class Matcher(metaclass=MatcherMeta):
if matcher.get_target() == ARG_KEY.format(key=key):
matcher.set_arg(key, event.get_message())
return
if matcher.get_arg(key):
if matcher.get_arg(key, ...) is not ...:
return
await matcher.reject(prompt)