Modified submit_bot function to handle invalid syntax and return error.