Confucius said this quote

Don’t grieve when people fail to recognize your ability. Grieve for your lack of ability instead.