privacy.py 776 B

1234567891011121314151617
  1. from nio.events.room_events import RoomMessageText
  2. from nio.rooms import MatrixRoom
  3. async def command_privacy(room: MatrixRoom, event: RoomMessageText, bot):
  4. body = "**Privacy**\n\nIf you use this bot, note that your messages will be sent to the following recipients:\n\n"
  5. body += "- The bot's operator" + (f"({bot.operator})" if bot.operator else "") + "\n"
  6. if bot.chat_api:
  7. body += "- For chat requests: " + f"{bot.chat_api.operator}" + "\n"
  8. if bot.image_api:
  9. body += "- For image generation requests (!gptbot imagine): " + f"{bot.image_api.operator}" + "\n"
  10. if bot.calculate_api:
  11. body += "- For calculation requests (!gptbot calculate): " + f"{bot.calculate_api.operator}" + "\n"
  12. await bot.send_message(room, body, True)