diff options
author | Kyomotoi <[email protected]> | 2021-04-05 16:01:22 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2021-04-05 16:01:22 +0800 |
commit | 15dfd75ce84235b07b845fdfb42e269002b92c01 (patch) | |
tree | b27a1aa34d3f9f0dfffd579b62ed2b011986577a /ATRI/plugins/rich | |
parent | 64a991e035e52e0a17e73d4e671a22ea9a7489da (diff) | |
download | ATRI-15dfd75ce84235b07b845fdfb42e269002b92c01.tar.gz ATRI-15dfd75ce84235b07b845fdfb42e269002b92c01.tar.bz2 ATRI-15dfd75ce84235b07b845fdfb42e269002b92c01.zip |
✨🐛⚡️ 一些修改
新增:转发信息伪造
新增:关键词回复/添加/删除(待更新)
新增:涩图检测(部署方式待更新)
新增:使用方法
新增:ATRI语加密/解密
新增:注入检测
新增:部分命令频率限制
移除:群垃圾检测
优化:提升了部分代码可读性
优化:对 Service 部分代码进行重构
Diffstat (limited to 'ATRI/plugins/rich')
-rw-r--r-- | ATRI/plugins/rich/__init__.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ATRI/plugins/rich/__init__.py b/ATRI/plugins/rich/__init__.py index 7c8179d..8404da6 100644 --- a/ATRI/plugins/rich/__init__.py +++ b/ATRI/plugins/rich/__init__.py @@ -14,7 +14,7 @@ from ATRI.rule import ( from .data_source import dec -waiting_list = [] +temp_list = [] bilibili_rich = sv.on_message( @@ -24,17 +24,10 @@ sv.manual_reg_service("监听b站小程序") @bilibili_rich.handle() async def _bilibili_rich(bot: Bot, event: MessageEvent) -> None: - global waiting_list + global temp_list msg = str(event.raw_message).replace("\\", "") - user = event.user_id bv = False - if count_list(waiting_list, user) == 5: - waiting_list = del_list_aim(waiting_list, user) - return - - waiting_list.append(user) - if "qqdocurl" not in msg: if "av" in msg: av = re.findall(r"(av\d+)", msg)[0].replace('av', '') @@ -60,6 +53,13 @@ async def _bilibili_rich(bot: Bot, event: MessageEvent) -> None: else: return + if count_list(temp_list, av) == 4: + await bot.send(event, "你是怕别人看不到么发这么多次?") + temp_list = del_list_aim(temp_list, av) + return + + temp_list.append(av) + try: URL = f"https://api.kyomotoi.moe/api/bilibili/v2/?aid={av}" except: |