diff options
| author | Kyomotoi <1172294279@qq.com> | 2021-04-11 15:13:30 +0800 | 
|---|---|---|
| committer | Kyomotoi <1172294279@qq.com> | 2021-04-11 15:13:30 +0800 | 
| commit | 17445acc365a42730592f61775827cde2e93b099 (patch) | |
| tree | 3592aeb69f69db05e5bdda08357f03a0fe7ed2a9 /ATRI/plugins | |
| parent | 73af8a7f91fd958c88ed4c05b70715b0cdaed47e (diff) | |
| download | ATRI-17445acc365a42730592f61775827cde2e93b099.tar.gz ATRI-17445acc365a42730592f61775827cde2e93b099.tar.bz2 ATRI-17445acc365a42730592f61775827cde2e93b099.zip | |
🐛 修正触发方式
Diffstat (limited to 'ATRI/plugins')
| -rw-r--r-- | ATRI/plugins/hitokoto.py | 17 | 
1 files changed, 9 insertions, 8 deletions
| diff --git a/ATRI/plugins/hitokoto.py b/ATRI/plugins/hitokoto.py index 70d3280..eeddf2f 100644 --- a/ATRI/plugins/hitokoto.py +++ b/ATRI/plugins/hitokoto.py @@ -19,23 +19,24 @@ __doc__ = """  权限组:所有人  用法:    @一言 -  抑郁一下 -  网抑云 +  @抑郁一下 +  @网抑云  补充:    @:at Bot  """ -hitokoto = sv.on_command( -    cmd="一言", -    docs=__doc__, -    aliases={"抑郁一下", "网抑云"}, -    rule=is_in_service('一言') & to_bot() -) +hitokoto = sv.on_message(rule=is_in_service('一言') & to_bot()) +sv.manual_reg_service('一言', __doc__)  @hitokoto.handle()  async def _hitokoto(bot: Bot, event: MessageEvent) -> None:      global sick_list +    msg = str(event.message)      user = event.get_user_id() +    hito_key = ['一言', '抑郁一下', '网抑云'] +     +    if msg not in hito_key: +        return      if count_list(sick_list, user) == 3:          sick_list.append(user) | 
