help.py 1.3 KB

123456789101112131415161718192021222324
  1. from nio.events.room_events import RoomMessageText
  2. from nio.rooms import MatrixRoom
  3. async def command_help(room: MatrixRoom, event: RoomMessageText, bot):
  4. body = """Available commands:
  5. - !gptbot help - Show this message
  6. - !gptbot botinfo - Show information about the bot
  7. - !gptbot privacy - Show privacy information
  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 systemmessage \<message\> - Get or set the system message for this room
  11. - !gptbot coin - Flip a coin (heads or tails)
  12. - !gptbot dice [number] - Roll a dice with the specified number of sides (default: 6)
  13. - !gptbot imagine \<prompt\> - Generate an image from a prompt
  14. - !gptbot calculate [--text] [--details] \<query\> - Calculate a result to a calculation, optionally forcing text output instead of an image, and optionally showing additional details like the input interpretation
  15. - !gptbot chat \<message\> - Send a message to the chat API
  16. - !gptbot classify \<message\> - Classify a message using the classification API
  17. - !gptbot custom \<message\> - Used for custom commands handled by the chat model and defined through the room's system message
  18. - !gptbot ignoreolder - Ignore messages before this point as context
  19. """
  20. await bot.send_message(room, body, True)