Skip to content

Commit

Permalink
🔖 version 0.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RF-Tar-Railt committed Aug 13, 2023
1 parent e0534c5 commit bb5610f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/nonebot_plugin_alconna/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
from .consts import ALCONNA_EXEC_RESULT as ALCONNA_EXEC_RESULT
from .rule import set_output_converter as set_output_converter

__version__ = "0.13.0"
__version__ = "0.14.0"

_meta_source = {
"name": "Alconna 插件",
Expand Down
6 changes: 2 additions & 4 deletions src/nonebot_plugin_alconna/rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,14 @@ async def __call__(self, event: Event, state: T_State) -> bool:
if _type is str:
if not seg.is_text():
return False
if self.remove:
msg_copy.remove(seg)
result.append(seg.data["text"])
else:
res = env[_type].validate(seg)
if not res.success:
return False
if self.remove:
msg_copy.remove(seg)
result.append(res.value)
if self.remove:
msg_copy.remove(seg)
state[SEGMATCH_RESULT] = result
state[SEGMATCH_MSG] = msg_copy
return True
Expand Down

0 comments on commit bb5610f

Please sign in to comment.