From 64a991e035e52e0a17e73d4e671a22ea9a7489da Mon Sep 17 00:00:00 2001 From: Kyomotoi <1172294279@qq.com> Date: Sun, 14 Mar 2021 16:22:34 +0800 Subject: =?UTF-8?q?=E2=9C=A8=F0=9F=90=9B=20=E6=9B=B4=E6=96=B0=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=BA=9Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ATRI/plugins/curse/__init__.py | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) (limited to 'ATRI/plugins/curse/__init__.py') diff --git a/ATRI/plugins/curse/__init__.py b/ATRI/plugins/curse/__init__.py index f78e022..03da205 100644 --- a/ATRI/plugins/curse/__init__.py +++ b/ATRI/plugins/curse/__init__.py @@ -1,24 +1,8 @@ -#!/usr/bin/env python3 -# -*- coding:utf-8 -*- -''' -File: __init__.py -Created Date: 2021-02-04 17:58:27 -Author: Kyomotoi -Email: Kyomotoiowo@gmail.com -License: GPLv3 -Project: https://github.com/Kyomotoi/ATRI --------- -Last Modified: Sunday, 7th March 2021 3:14:41 pm -Modified By: Kyomotoi (kyomotoiowo@gmail.com) --------- -Copyright (c) 2021 Kyomotoi -''' - -from nonebot.plugin import on_command from nonebot.adapters.cqhttp import Bot, MessageEvent +from ATRI.service import Service as sv from ATRI.rule import ( - is_in_banlist, + is_block, is_in_dormant, is_in_service ) @@ -33,10 +17,11 @@ sick_list = [] __plugin_name__ = 'curse' -curse = on_command( - "口臭一下", +curse = sv.on_command( + name="口臭", + cmd="口臭一下", aliases={"口臭", "骂我"}, - rule=is_in_banlist() & is_in_dormant() + rule=is_block() & is_in_dormant() & is_in_service(__plugin_name__) ) -- cgit v1.2.3