You run a service that executes shell commands in whatever permission mode, and then you have your chat bot output their commands # and comments which the service then executes at your peril.
The handler that hands off between these pieces can post the stdout/stderr to chat.
The handler that hands off between these pieces can post the stdout/stderr to chat.