-
My usecase is: I want to send some data into a chat, the bot processes the data and then sends something (that depends on the exact data that was given) back in the same chat. It seems matrix-commander can only print messages it received and not invoke any actions (calling other scripts with data from the received message for example). Then I saw that one can import matrix-commander into Python scripts which should enable processing received messages and sending something back. But there seems to be no real documentation, only the example Is there some way one can use matrix-commander to react to messages? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
The simple way is to have your own Python program run matrix-commander as a shell command, and wait for input. When MC prints some text your program can receive it, figure out what it wants to do, then call another instance of MC to send a message of your choice. This is the main way I make use of MC, though I use Perl myself and am not sure of the details of how to do it in Python. |
Beta Was this translation helpful? Give feedback.
-
@edwinsage is correct.
You follow the use-case from @edwinsage or you use a Matrix bot. There are several bots out there including https://github.com/8go/matrix-eno-bot. |
Beta Was this translation helpful? Give feedback.
The simple way is to have your own Python program run matrix-commander as a shell command, and wait for input. When MC prints some text your program can receive it, figure out what it wants to do, then call another instance of MC to send a message of your choice. This is the main way I make use of MC, though I use Perl myself and am not sure of the details of how to do it in Python.