One command per line (like .mcfunction): skip blanks + '#' comments, strip a leading '/' — sendCommand wants the bare command, exactly as the chat screen passes it (string.substring(1)).
sendCommand
string.substring(1)