jerrita 9 ay önce
ebeveyn
işleme
6d63daa9ee
2 değiştirilmiş dosya ile 8 ekleme ve 5 silme
  1. 2 2
      main.py
  2. 6 3
      plugins/anon/base.py

+ 2 - 2
main.py

@@ -2,7 +2,7 @@ from anon import Bot
 from anon.logger import logger
 import logging
 
-logger.setLevel(logging.INFO)
+logger.setLevel(logging.DEBUG)
 
 if __name__ == '__main__':
     anon = Bot('192.168.5.145:5800', '114514')
@@ -10,4 +10,4 @@ if __name__ == '__main__':
         'plugins.anon.base',
         'plugins.anon.muri'
     ])
-    anon.loop()
+    anon.loop()

+ 6 - 3
plugins/anon/base.py

@@ -6,14 +6,17 @@ from anon.event.event import Event
 from anon.plugin import PluginManager, Plugin
 from anon.event import MessageEvent
 
+
 class AnonPlugin(Plugin):
     def on_load(self):
         super().on_load()
         self.interested = [MessageEvent]
-        asyncio.run(Bot().send_private_message(78298122, f"Anon Started at: {datetime.datetime.now()}"))
-    
+        bot = Bot()
+        asyncio.run(bot.send_private_message(782981223, f"Anon Started at: {datetime.datetime.now()}"))
+
     async def on_event(self, event: MessageEvent):
         if event.raw == 'anon':
             await event.reply('は?')
 
-PluginManager().register_plugin(AnonPlugin())
+
+PluginManager().register_plugin(AnonPlugin())