2023-04-19 06:11:28 +00:00
|
|
|
from nio.events.room_events import RoomMessageText
|
|
|
|
from nio.rooms import MatrixRoom
|
|
|
|
|
2023-04-23 13:26:46 +00:00
|
|
|
|
2023-04-25 11:25:53 +00:00
|
|
|
async def command_help(room: MatrixRoom, event: RoomMessageText, bot):
|
|
|
|
body = """Available commands:
|
2023-04-19 06:11:28 +00:00
|
|
|
|
2023-04-28 10:01:27 +00:00
|
|
|
- !gptbot help - Show this message
|
2023-05-01 08:43:25 +00:00
|
|
|
- !gptbot botinfo - Show information about the bot
|
|
|
|
- !gptbot privacy - Show privacy information
|
2023-04-28 10:01:27 +00:00
|
|
|
- !gptbot newroom \<room name\> - Create a new room and invite yourself to it
|
|
|
|
- !gptbot stats - Show usage statistics for this room
|
|
|
|
- !gptbot systemmessage \<message\> - Get or set the system message for this room
|
2023-05-09 10:27:03 +00:00
|
|
|
- !gptbot space [enable|disable|update|invite] - Enable, disable, force update, or invite yourself to your space
|
2023-05-01 08:43:25 +00:00
|
|
|
- !gptbot coin - Flip a coin (heads or tails)
|
2023-05-01 15:49:26 +00:00
|
|
|
- !gptbot dice [number] - Roll a dice with the specified number of sides (default: 6)
|
2023-04-28 10:01:27 +00:00
|
|
|
- !gptbot imagine \<prompt\> - Generate an image from a prompt
|
|
|
|
- !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
|
2023-05-01 06:11:43 +00:00
|
|
|
- !gptbot chat \<message\> - Send a message to the chat API
|
|
|
|
- !gptbot classify \<message\> - Classify a message using the classification API
|
2023-05-01 08:12:50 +00:00
|
|
|
- !gptbot custom \<message\> - Used for custom commands handled by the chat model and defined through the room's system message
|
2023-05-01 08:43:25 +00:00
|
|
|
- !gptbot ignoreolder - Ignore messages before this point as context
|
2023-04-25 11:25:53 +00:00
|
|
|
"""
|
|
|
|
|
2023-05-01 08:43:25 +00:00
|
|
|
await bot.send_message(room, body, True)
|