mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-09-29 00:32:06 +08:00
✨ 更加细致的群被动管理
This commit is contained in:
@@ -16,24 +16,17 @@ _status_matcher = on_alconna(
|
||||
Option("-t|--task", action=store_true, help_text="被动技能"),
|
||||
Option("-df|--default", action=store_true, help_text="进群默认开关"),
|
||||
Option("--all", action=store_true, help_text="全部插件/被动"),
|
||||
Option("-g|--group", Args["group?", str], help_text="指定群组"),
|
||||
Subcommand(
|
||||
"open",
|
||||
Args["plugin_name?", [str, int]],
|
||||
Option(
|
||||
"-g|--group",
|
||||
Args["group", str],
|
||||
),
|
||||
),
|
||||
Subcommand(
|
||||
"close",
|
||||
Args["plugin_name?", [str, int]],
|
||||
Option(
|
||||
"-t|--type",
|
||||
Args["block_type", ["all", "a", "private", "p", "group", "g"]],
|
||||
),
|
||||
Option(
|
||||
"-g|--group",
|
||||
Args["group", str],
|
||||
Args["block_type?", ["all", "a", "private", "p", "group", "g"]],
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -67,12 +60,20 @@ _status_matcher.shortcut(
|
||||
|
||||
|
||||
_status_matcher.shortcut(
|
||||
r"开启群被动(?P<name>.+)",
|
||||
r"开启群被动\s*(?P<name>.+)",
|
||||
command="switch",
|
||||
arguments=["open", "{name}", "--task"],
|
||||
prefix=True,
|
||||
)
|
||||
|
||||
_status_matcher.shortcut(
|
||||
r"关闭群被动\s*(?P<name>.+)",
|
||||
command="switch",
|
||||
arguments=["close", "{name}", "--task"],
|
||||
prefix=True,
|
||||
)
|
||||
|
||||
|
||||
_status_matcher.shortcut(
|
||||
r"开启(所有|全部)群被动",
|
||||
command="switch",
|
||||
@@ -117,14 +118,6 @@ _status_matcher.shortcut(
|
||||
)
|
||||
|
||||
|
||||
_status_matcher.shortcut(
|
||||
r"关闭群被动(?P<name>.+)",
|
||||
command="switch",
|
||||
arguments=["close", "{name}", "--task"],
|
||||
prefix=True,
|
||||
)
|
||||
|
||||
|
||||
_status_matcher.shortcut(
|
||||
r"关闭所有(插件|功能)",
|
||||
command="switch",
|
||||
@@ -139,6 +132,13 @@ _status_matcher.shortcut(
|
||||
prefix=True,
|
||||
)
|
||||
|
||||
_status_matcher.shortcut(
|
||||
r"关闭(?P<name>.+)",
|
||||
command="switch",
|
||||
arguments=["close", "{name}"],
|
||||
prefix=True,
|
||||
)
|
||||
|
||||
_status_matcher.shortcut(
|
||||
r"关闭(插件|功能)df(?P<name>.+)",
|
||||
command="switch",
|
||||
@@ -146,12 +146,6 @@ _status_matcher.shortcut(
|
||||
prefix=True,
|
||||
)
|
||||
|
||||
_status_matcher.shortcut(
|
||||
r"关闭(?P<name>.+)",
|
||||
command="switch",
|
||||
arguments=["close", "{name}"],
|
||||
prefix=True,
|
||||
)
|
||||
|
||||
_group_status_matcher.shortcut(
|
||||
r"醒来",
|
||||
|
||||
Reference in New Issue
Block a user