Feature: 添加多消息段命令解析支持 (#2419)

Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
This commit is contained in:
RainEggplant
2023-10-18 15:55:09 +08:00
committed by GitHub
parent 6559b2ff27
commit 97a57c2f6e
2 changed files with 35 additions and 0 deletions

View File

@ -117,6 +117,11 @@ class TrieRule:
# check whitespace
arg_str = segment_text[len(pf.key) :]
arg_str_stripped = arg_str.lstrip()
# check next segment until arg detected or no text remain
while not arg_str_stripped and msg and msg[0].is_text():
arg_str += str(msg.pop(0))
arg_str_stripped = arg_str.lstrip()
has_arg = arg_str_stripped or msg
if (
has_arg