Skip to content

Commit d44be02

Browse files
committed
🐛 fix missing ValidationError
1 parent c068aaa commit d44be02

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

example/.env.prod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ALCONNA_AUTO_SEND_OUTPUT=true
55
ALCONNA_USE_COMMAND_START=true
66
ALCONNA_GLOBAL_COMPLETION='
77
{
8-
"tab": "true"
8+
"tab": "True"
99
}
1010
'
1111
NBP_ALC_PAGE_SIZE=6

src/nonebot_plugin_alconna/rule.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from tarina import lang, init_spec
88
from nonebot.matcher import Matcher
99
from nonebot.utils import escape_tag
10+
from pydantic import ValidationError
1011
from nonebot.adapters import Bot, Event
1112
from nonebot.plugin.on import on_message
1213
from nonebot.internal.rule import Rule as Rule
@@ -123,8 +124,12 @@ def __init__(
123124
with command_manager.update(command):
124125
command.meta.context_style = config.alconna_context_style
125126
self.use_origin = config.alconna_use_origin if use_origin is None else use_origin
127+
except ValidationError:
128+
raise
126129
except ValueError:
127130
self.auto_send = True if auto_send_output is None else auto_send_output
131+
self.response_self = False if response_self is None else response_self
132+
self.use_origin = False if use_origin is None else use_origin
128133

129134
def _update(cmd_id: int):
130135
try:

0 commit comments

Comments
 (0)