|
@@ -1,7 +1,19 @@
|
|
-from anon.plugin import PluginManager
|
|
|
|
|
|
+import asyncio
|
|
|
|
+import datetime
|
|
|
|
+
|
|
|
|
+from anon import Bot
|
|
|
|
+from anon.event.event import Event
|
|
|
|
+from anon.plugin import PluginManager, Plugin
|
|
from anon.event import MessageEvent
|
|
from anon.event import MessageEvent
|
|
|
|
|
|
-@PluginManager().register_event([MessageEvent])
|
|
|
|
-async def anon(event: MessageEvent):
|
|
|
|
- if event.raw == 'anon':
|
|
|
|
- await event.reply('は?')
|
|
|
|
|
|
+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()}"))
|
|
|
|
+
|
|
|
|
+ async def on_event(self, event: MessageEvent):
|
|
|
|
+ if event.raw == 'anon':
|
|
|
|
+ await event.reply('は?')
|
|
|
|
+
|
|
|
|
+PluginManager().register_plugin(AnonPlugin())
|