diff options
Diffstat (limited to 'ATRI/plugins/applet')
-rw-r--r-- | ATRI/plugins/applet/__init__.py | 7 | ||||
-rw-r--r-- | ATRI/plugins/applet/data_source.py | 9 |
2 files changed, 7 insertions, 9 deletions
diff --git a/ATRI/plugins/applet/__init__.py b/ATRI/plugins/applet/__init__.py index 9c4d0ce..5949e34 100644 --- a/ATRI/plugins/applet/__init__.py +++ b/ATRI/plugins/applet/__init__.py @@ -1,10 +1,15 @@ from nonebot.adapters.onebot.v11 import MessageEvent from nonebot.adapters.onebot.v11.helpers import Cooldown +from ATRI.service import Service + from .data_source import Applet -bili_applet = Applet().on_message("b站小程序检测", "B站小程序爪巴", priority=5, block=False) +plugin = Service("小程序处理").document("啥b腾讯小程序给👴爪巴\n目前只整了b站的") + + +bili_applet = plugin.on_message("b站小程序检测", "B站小程序爪巴", priority=5, block=False) @bili_applet.handle([Cooldown(3)]) diff --git a/ATRI/plugins/applet/data_source.py b/ATRI/plugins/applet/data_source.py index e94c0d9..296c337 100644 --- a/ATRI/plugins/applet/data_source.py +++ b/ATRI/plugins/applet/data_source.py @@ -1,8 +1,6 @@ import re -from ATRI.service import Service from ATRI.utils import request -from ATRI.rule import is_in_service URL = "https://api.kyomotoi.moe/api/bilibili/v3/video_info?aid=" @@ -16,12 +14,7 @@ xor = 177451812 add = 8728348608 -class Applet(Service): - def __init__(self): - Service.__init__( - self, "小程序处理", "啥b腾讯小程序给👴爪巴\n目前只整了b站的", rule=is_in_service("小程序处理") - ) - +class Applet: @staticmethod def _bv_dec(x) -> str: r = 0 |