help.py 933 B

12345678910111213141516171819
  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 newroom \<room name\> - Create a new room and invite yourself to it
  7. - !gptbot stats - Show usage statistics for this room
  8. - !gptbot botinfo - Show information about the bot
  9. - !gptbot coin - Flip a coin (heads or tails)
  10. - !gptbot ignoreolder - Ignore messages before this point as context
  11. - !gptbot systemmessage \<message\> - Get or set the system message for this room
  12. - !gptbot imagine \<prompt\> - Generate an image from a prompt
  13. - !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
  14. """
  15. await bot.send_message(room, body, True)