BTW haven't seen many people talk about this but it's incredibly likely the reason why Papyrus is so "I'M AWESOME" is to compensate. He literally lies to us about NEVER wondering what having friends is like and NEVER feels lonely and YOU'RE the lonely one actually.
I still think he thinks he's great, but he seems to be compensating something. i hc when he has doubts he gets extra loud to shut them up. When he says something like "EVERYONE LOVES ME! NO ONE WOULD EVER USE/BETRAY ME BECAUSE I'M TOO COOL" he's just shutting down negative self talk. However, it's not always negative self talk. Sometimes it's grasping what really happened and he shuts it away too.
King Papyrus, for an example. Papyrus isn't an idiot. He obviously knows something is wrong. He knows deep down Sans is lying to him (Also Sans sheltering Papyrus from painful truth like this may be the reason he doesn't let his true thoughts out and lies to himself) but he still says that they must be having a fun vacation. We KNOW Papyrus knows they're dead because of his sprite and the text before it.
However, the King Papyrus ending does have Papyrus go mask off once Sans is gone, which is strange because he's loud about his positive thoughts even when he's not around. It does show that he's grown a bit and can take bad news and doesn't force himself to think everything is fine, however he doesn't want to stress Sans.












