diff options
author | Kyomotoi <[email protected]> | 2021-07-08 22:09:00 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2021-07-08 22:09:00 +0800 |
commit | be2747e4d4b820ca0f1f988d3b77a628da26fe7b (patch) | |
tree | e1a59dd79ecd973a7d704568dcdc018f1f1b651a /ATRI/plugins/curse/__init__.py | |
parent | a4e1b9d1581d756ef79ad063d1c0bd6b2fd13c1d (diff) | |
download | ATRI-be2747e4d4b820ca0f1f988d3b77a628da26fe7b.tar.gz ATRI-be2747e4d4b820ca0f1f988d3b77a628da26fe7b.tar.bz2 ATRI-be2747e4d4b820ca0f1f988d3b77a628da26fe7b.zip |
🔖♻️🐛🔧🔥📝 更新版本:YHN-001-A03
🔖 更新版本至:YHN-001-A03
✨ 新增插件:
- 涩图
- 闲聊(文爱
♻️ 重构:
- Service
- 所有插件
🐛 修复部分小bug
🔧 暂时移除部分设置
🔥 删除:
- 插件:nsfw、wife。日后加回
- 插件 essential 中部分内容
📝 更新README
Diffstat (limited to 'ATRI/plugins/curse/__init__.py')
-rw-r--r-- | ATRI/plugins/curse/__init__.py | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/ATRI/plugins/curse/__init__.py b/ATRI/plugins/curse/__init__.py deleted file mode 100644 index 702e5ac..0000000 --- a/ATRI/plugins/curse/__init__.py +++ /dev/null @@ -1,42 +0,0 @@ -from nonebot.adapters.cqhttp import Bot, MessageEvent - -from ATRI.service import Service as sv -from ATRI.rule import is_in_service, to_bot -from ATRI.utils.list import count_list, del_list_aim -from ATRI.utils.request import get_text -from ATRI.exceptions import RequestError - - -URL = "https://zuanbot.com/api.php?level=min&lang=zh_cn" -sick_list = [] - - -__doc__ = """ -口臭一下 -权限组:所有人 -用法: - 口臭,口臭一下,骂我 -""" - -curse = sv.on_command( - cmd="口臭", docs=__doc__, aliases={"口臭一下,骂我"}, rule=is_in_service("口臭") & to_bot() -) - - -async def _curse(bot: Bot, event: MessageEvent) -> None: - global sick_list - user = event.get_user_id() - if count_list(sick_list, user) == 3: - sick_list.append(user) - repo = "不是??你这么想被咱骂的嘛??" "被咱骂就这么舒服的吗?!" "该......你该不会是.....M吧!" - await curse.finish(repo) - elif count_list(sick_list, user) == 6: - sick_list = del_list_aim(sick_list, user) - await curse.finish("给我适可而止阿!?") - else: - sick_list.append(user) - try: - await curse.finish(await get_text(URL)) - except RequestError: - raise RequestError("Time out!") |