help.py 671 B

12345678910111213141516
  1. from nio.events.room_events import RoomMessageText
  2. from nio.rooms import MatrixRoom
  3. async def command_help(room: MatrixRoom, event: RoomMessageText, context: dict):
  4. await context["client"].room_send(
  5. room.room_id, "m.room.message", {"msgtype": "m.notice",
  6. "body": """Available commands:
  7. !gptbot help - Show this message
  8. !gptbot newroom <room name> - Create a new room and invite yourself to it
  9. !gptbot stats - Show usage statistics for this room
  10. !gptbot botinfo - Show information about the bot
  11. !gptbot coin - Flip a coin (heads or tails)
  12. !gptbot ignoreolder - Ignore messages before this point as context
  13. """}
  14. )