fix: no yield
This commit is contained in:
@@ -45,7 +45,7 @@ class MyPlugin(Star):
|
|||||||
|
|
||||||
@filter.on_decorating_result()
|
@filter.on_decorating_result()
|
||||||
async def pattern_extract(self,event:AstrMessageEvent):
|
async def pattern_extract(self,event:AstrMessageEvent):
|
||||||
yield self.Timer.parse(event)
|
await self.Timer.parse(event)
|
||||||
|
|
||||||
async def terminate(self):
|
async def terminate(self):
|
||||||
"""可选择实现异步的插件销毁方法,当插件被卸载/停用时会调用。"""
|
"""可选择实现异步的插件销毁方法,当插件被卸载/停用时会调用。"""
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@ class TimerService:
|
|||||||
if not Second is None:
|
if not Second is None:
|
||||||
self.timer(event,Second)
|
self.timer(event,Second)
|
||||||
|
|
||||||
yield
|
|
||||||
|
|
||||||
# 定时:
|
# 定时:
|
||||||
def timer(self,event:AstrMessageEvent,Sec:int):
|
def timer(self,event:AstrMessageEvent,Sec:int):
|
||||||
|
|||||||
Reference in New Issue
Block a user