summaryrefslogtreecommitdiff
path: root/ATRI/plugins/applet/__init__.py
diff options
context:
space:
mode:
authorSakuraMemory <[email protected]>2022-02-18 14:37:29 +0800
committerGitHub <[email protected]>2022-02-18 14:37:29 +0800
commitc9f78dad4e823c99119b274ef0cd95512d80d5d7 (patch)
treeddd35eaa525247cd7caf75d74275dec5d3be8257 /ATRI/plugins/applet/__init__.py
parenta9b698b4a08bff4a0747adca71a9b55808be4bff (diff)
parente7ff55fa0b39805ec759afd5b06c666538f5c7f1 (diff)
downloadATRI-c9f78dad4e823c99119b274ef0cd95512d80d5d7.tar.gz
ATRI-c9f78dad4e823c99119b274ef0cd95512d80d5d7.tar.bz2
ATRI-c9f78dad4e823c99119b274ef0cd95512d80d5d7.zip
Merge pull request #1 from Kyomotoi/main
Update From Main Branch
Diffstat (limited to 'ATRI/plugins/applet/__init__.py')
-rw-r--r--ATRI/plugins/applet/__init__.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/ATRI/plugins/applet/__init__.py b/ATRI/plugins/applet/__init__.py
index d6e2ab6..8d89514 100644
--- a/ATRI/plugins/applet/__init__.py
+++ b/ATRI/plugins/applet/__init__.py
@@ -1,21 +1,21 @@
from nonebot.adapters.onebot.v11 import MessageEvent
from nonebot.adapters.onebot.v11.helpers import Cooldown
-from ATRI.log import logger as log
from .data_source import Applet
-bili_applet = Applet().on_message("小程序检测", "小程序爪巴", block=False)
+bili_applet = Applet().on_message("b站小程序检测", "B站小程序爪巴", block=False)
@bili_applet.handle([Cooldown(3)])
-async def _fk_bili(event: MessageEvent):
- msg = str(event.message)
+async def _(event: MessageEvent):
+ msg = str(event.get_message())
try:
- result, is_ok = await Applet().fk_bili(msg)
+ result, is_ok = await Applet().msg_builder(msg)
except Exception:
return
- log.debug(result, is_ok)
+
if not is_ok:
return
+
await bili_applet.finish(result)