diff options
author | Kyomotoi <[email protected]> | 2021-07-31 16:16:47 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2021-07-31 16:16:47 +0800 |
commit | 336eb9d9e98b0bee952c27a50820dbdb350bcc03 (patch) | |
tree | 718d5349232bce0d06cc901707bdd8f478c43314 /ATRI/plugins/curse.py | |
parent | c485985d3be687d17168512de44ea7b744fea7cc (diff) | |
download | ATRI-336eb9d9e98b0bee952c27a50820dbdb350bcc03.tar.gz ATRI-336eb9d9e98b0bee952c27a50820dbdb350bcc03.tar.bz2 ATRI-336eb9d9e98b0bee952c27a50820dbdb350bcc03.zip |
🔥🚚✨
- 移除:laugh.txt,需要时再拉取
- 移动控制台文件至plugins/console目录下
- 新增:
- 和管理贴贴w
- 正式的可视化前端单页
Diffstat (limited to 'ATRI/plugins/curse.py')
-rw-r--r-- | ATRI/plugins/curse.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/ATRI/plugins/curse.py b/ATRI/plugins/curse.py index edd6249..b2dbc05 100644 --- a/ATRI/plugins/curse.py +++ b/ATRI/plugins/curse.py @@ -20,9 +20,10 @@ __doc__ = """ class Curse(Service): + def __init__(self): Service.__init__(self, "口臭", __doc__, rule=is_in_service("口臭")) - + @staticmethod async def now() -> str: res = await request.get(URL) @@ -30,17 +31,14 @@ class Curse(Service): return result -normal_curse = Curse().on_command( - "口臭一下", "主命令,骂你一下", aliases={"骂我", "口臭"}, rule=to_bot() -) - +normal_curse = Curse().on_command("口臭一下", "主命令,骂你一下", aliases={"骂我", "口臭"}, rule=to_bot()) @normal_curse.handle() async def _deal_n_curse(bot: Bot, event: MessageEvent): user_id = event.get_user_id() if not _curse_flmt.check(user_id): await normal_curse.finish(_curse_flmt_notice) - + result = await Curse().now() _curse_flmt.start_cd(user_id) await normal_curse.finish(result) @@ -48,13 +46,12 @@ async def _deal_n_curse(bot: Bot, event: MessageEvent): super_curse = Curse().on_regex(r"[来求有](.*?)骂我吗?", "有求必应") - @super_curse.handle() async def _deal_s_curse(bot: Bot, event: MessageEvent): user_id = event.get_user_id() if not _curse_flmt.check(user_id): await normal_curse.finish(_curse_flmt_notice) - + result = await Curse().now() _curse_flmt.start_cd(user_id) await normal_curse.finish(result) |