How can i get rid of the error "cannot convert 'String' to 'const char*'"
there is no reason for command to be a String array. Instead make it a const char**:

const char** commands = {"/test", "/say", "/reset", "/sleep"};