|
@@ -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())
|