jerrita 9 mesi fa
parent
commit
d37c8c2ae4
1 ha cambiato i file con 2 aggiunte e 3 eliminazioni
  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':