diff options
author | Kyomotoi <[email protected]> | 2020-11-29 23:46:42 +0800 |
---|---|---|
committer | GitHub <[email protected]> | 2020-11-29 23:46:42 +0800 |
commit | bb24f204cfa3618ae52b7434f463a934817e1e62 (patch) | |
tree | cbd519851cd823439c050c9ffe48bbb11a1162c4 | |
parent | bdb84e5b54857695d1fcfdb33f7f83d183bfaee6 (diff) | |
download | ATRI-bb24f204cfa3618ae52b7434f463a934817e1e62.tar.gz ATRI-bb24f204cfa3618ae52b7434f463a934817e1e62.tar.bz2 ATRI-bb24f204cfa3618ae52b7434f463a934817e1e62.zip |
[Fix]
-rw-r--r-- | ATRI/plugins/plugin_anime/__init__.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/ATRI/plugins/plugin_anime/__init__.py b/ATRI/plugins/plugin_anime/__init__.py index 9bed2b7..8a40789 100644 --- a/ATRI/plugins/plugin_anime/__init__.py +++ b/ATRI/plugins/plugin_anime/__init__.py @@ -205,15 +205,11 @@ SP_temp_list = [] SP_list = [] -def check_sepi() -> Rule: - """检查目标是否是涩批""" - async def _check_sepi(bot: Bot, event: Event, state: dict) -> bool: - if event.user_id in SP_list: - await bot.send(event, "你可少冲点吧!涩批!哼唧") - return False - else: - return True - return Rule(_check_sepi) +def check_sepi(user) -> bool: + if user in SP_list: + return True + else: + return False def add_sepi(user: int) -> None: """将目标移入涩批名单""" @@ -228,7 +224,7 @@ def del_sepi(user: int) -> None: setu = on_regex( r"来[点丶张份副个幅][涩色瑟][图圖]|[涩色瑟][图圖]来|[涩色瑟][图圖][gkd|GKD|搞快点]|[gkd|GKD|搞快点][涩色瑟][图圖]", - rule=check_banlist() & check_switch(plugin_name_2, False) & check_sepi()) + rule=check_banlist() & check_switch(plugin_name_2, False)) @setu.handle() @@ -237,7 +233,9 @@ async def _(bot: Bot, event: Event, state: dict) -> None: user = event.user_id group = event.group_id res = randint(1, 5) - print(1) + + if check_sepi(user): + await setu.finish("你可少冲点吧!涩批!哼唧“) if countX(SP_temp_list, user) == 5: add_sepi(user) # type: ignore |