That’s just a string, it doesn’t have a sendCommand() method.
You seem to be re-inventing this -
There is an action sendCommand(string, string) that is simple to use
sendCommand(string, string)