jerrita 9 月之前
父节点
当前提交
d37c8c2ae4
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      plugins/anon/base.py

+ 2 - 3
plugins/anon/base.py

@@ -8,11 +8,10 @@ from anon.event import MessageEvent
 
 
 class AnonPlugin(Plugin):
-    def on_load(self):
+    async def on_load(self):
         super().on_load()
         self.interested = [MessageEvent]
-        bot = Bot()
-        asyncio.run(bot.send_private_message(782981223, f"Anon Started at: {datetime.datetime.now()}"))
+        await Bot().send_private_message(782981223, f"Anon Started at: {datetime.datetime.now()}")
 
     async def on_event(self, event: MessageEvent):
         if event.raw == 'anon':