ignoreolder.py 570 B

12345678910
  1. from nio.events.room_events import RoomMessageText
  2. from nio.rooms import MatrixRoom
  3. async def command_ignoreolder(room: MatrixRoom, event: RoomMessageText, context: dict):
  4. await context["client"].room_send(
  5. room.room_id, "m.room.message", {"msgtype": "m.notice",
  6. "body": """Alright, messages before this point will not be processed as context anymore.
  7. If you ever reconsider, you can simply delete your message and I will start processing messages before it again."""}
  8. )