diff --git a/src/matrix_applicationbot/classes/bot.py b/src/matrix_applicationbot/classes/bot.py index 010241c..60280b2 100644 --- a/src/matrix_applicationbot/classes/bot.py +++ b/src/matrix_applicationbot/classes/bot.py @@ -496,3 +496,37 @@ class ApplicationBot: await self.client.room_send( target_room_id, "m.room.message", event.source["content"] ) + + async def help_command(self, room, sender): + if await self.is_operator(sender): + help_message = ( + "Operator Commands:\n" + "1. `!supportbot help` - Show this help message.\n" + "2. `!supportbot openticket` - Open a support ticket.\n" + "3. `!supportbot invite ` - Invite an operator to a ticket room.\n" + "4. `!supportbot close ` - Close a support ticket.\n" + "5. `!supportbot approve ` - Approve an application and invite to protected rooms.\n" + "6. `!supportbot reject ` - Reject an application.\n" + "7. `!supportbot list` - List open tickets.\n" + "8. `!supportbot monitor ` - Monitor a room for automatic ticket creation.\n" + "9. `!supportbot unmonitor ` - Stop monitoring a room.\n" + "10. `!supportbot monitored` - List monitored rooms.\n" + "11. `!supportbot protect ` - Protect a room.\n" + "12. `!supportbot unprotect ` - Unprotect a room.\n" + "13. `!supportbot protected` - List protected rooms." + ) + else: + help_message = ( + "User Commands:\n" + "1. `!supportbot help` - Show this help message.\n" + "2. `!supportbot openticket` - Open a support ticket." + ) + + await self.client.room_send( + room.room_id, + "m.room.message", + { + "msgtype": "m.text", + "body": help_message, + }, + ) \ No newline at end of file