From 3fccdbd5329e3aaaeebfaf27450f34cb39a18552 Mon Sep 17 00:00:00 2001 From: RF-Tar-Railt <3165388245@qq.com> Date: Sat, 3 Sep 2022 09:54:55 +0800 Subject: [PATCH] :bug: version 0.1.1 --- arclet/alconna/avilla/utils.py | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arclet/alconna/avilla/utils.py b/arclet/alconna/avilla/utils.py index ce0ec46..be33bb2 100644 --- a/arclet/alconna/avilla/utils.py +++ b/arclet/alconna/avilla/utils.py @@ -77,12 +77,12 @@ def command( def wrapper(func: T_Callable) -> T_Callable: cube: Cube[ListenerSchema] = ensure_cube_as_listener(func) cube.metaclass.listening_events.append(MessageReceived) + if not guild and not private: + raise ValueError if not guild: cube.metaclass.inline_dispatchers.append(Filter().ctx.follows("friend")) elif not private: cube.metaclass.inline_dispatchers.append(Filter().ctx.follows("group")) - else: - raise ValueError cube.metaclass.inline_dispatchers.append( AvillaAlconnaDispatcher( alconna, send_flag="post" if post else "reply", skip_for_unmatch=not send_error # type: ignore diff --git a/pyproject.toml b/pyproject.toml index 809d142..7979bc9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "arclet-alconna-avilla" -version = "0.1.0" +version = "0.1.1" description = "Support Alconna for Avilla" authors = [ {name = "RF-Tar-Railt", email = "rf_tar_railt@qq.com"},