|
@@ -15,21 +15,18 @@ class AnonPlugin(Plugin):
|
|
await 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):
|
|
async def on_event(self, event: MessageEvent):
|
|
- if event.raw == 'anon':
|
|
|
|
- await event.reply('は?')
|
|
|
|
-
|
|
|
|
# repeater
|
|
# repeater
|
|
if isinstance(event, GroupMessage):
|
|
if isinstance(event, GroupMessage):
|
|
group_id = event.gid
|
|
group_id = event.gid
|
|
if group_id not in repeater:
|
|
if group_id not in repeater:
|
|
- repeater[group_id] = [event.raw, 1]
|
|
|
|
|
|
+ repeater[group_id] = [event.msg, 1]
|
|
else:
|
|
else:
|
|
- if repeater[group_id][0] == event.raw:
|
|
|
|
|
|
+ if repeater[group_id][0].text() == event.msg.text():
|
|
repeater[group_id][1] += 1
|
|
repeater[group_id][1] += 1
|
|
if repeater[group_id][1] == 3:
|
|
if repeater[group_id][1] == 3:
|
|
- await event.reply(event.raw, quote=False)
|
|
|
|
|
|
+ await event.reply(event.msg, quote=False)
|
|
else:
|
|
else:
|
|
- repeater[group_id] = [event.raw, 1]
|
|
|
|
|
|
+ repeater[group_id] = [event.msg, 1]
|
|
|
|
|
|
async def on_shutdown(self):
|
|
async def on_shutdown(self):
|
|
await Bot().send_private_message(782981223, f'Anon shutdown at: {datetime.datetime.now()}')
|
|
await Bot().send_private_message(782981223, f'Anon shutdown at: {datetime.datetime.now()}')
|