Skip to content

Commit

Permalink
🐛 fix missing ValidationError
Browse files Browse the repository at this point in the history
  • Loading branch information
RF-Tar-Railt committed Dec 8, 2024
1 parent c068aaa commit d44be02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion example/.env.prod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ALCONNA_AUTO_SEND_OUTPUT=true
ALCONNA_USE_COMMAND_START=true
ALCONNA_GLOBAL_COMPLETION='
{
"tab": "true"
"tab": "True"
}
'
NBP_ALC_PAGE_SIZE=6
Expand Down
5 changes: 5 additions & 0 deletions src/nonebot_plugin_alconna/rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from tarina import lang, init_spec
from nonebot.matcher import Matcher
from nonebot.utils import escape_tag
from pydantic import ValidationError
from nonebot.adapters import Bot, Event
from nonebot.plugin.on import on_message
from nonebot.internal.rule import Rule as Rule
Expand Down Expand Up @@ -123,8 +124,12 @@ def __init__(
with command_manager.update(command):
command.meta.context_style = config.alconna_context_style
self.use_origin = config.alconna_use_origin if use_origin is None else use_origin
except ValidationError:
raise
except ValueError:
self.auto_send = True if auto_send_output is None else auto_send_output
self.response_self = False if response_self is None else response_self
self.use_origin = False if use_origin is None else use_origin

def _update(cmd_id: int):
try:
Expand Down

0 comments on commit d44be02

Please sign in to comment.