I think this is Granny Weatherwax
But you may be conflating two of her traits:
- Granny disliking all children.
- Always doing the right thing, because you know the difference between right and wrong.
Disliking children:
Granny Weatherwax personally disliked young Pewsey. She disliked all small children, which is why she got on with them so well. In Pewsey's case, she felt that no one should be allowed to wander around in just a vest even if they were four years old. And the child had a permanently runny nose and ought to be provided with a handkerchief or, failing that, a cork.
Nanny Ogg, on the other hand, was instant putty in the hands of any grandchild, even one as sticky as Pewsey
"Want sweetie," growled Pewsey, in that curiously deep voice some young children have.
"Just in a moment, my duck, I'm talking to the lady," Nanny Ogg fluted.
"Want sweetie now."
"Bugger off, my precious, Nana's busy right this minute."
Pewsey pulled hard on Nanny Ogg's skirts.
"Now sweetie now!"
Granny Weatherwax leaned down until her impressive nose was about level with Pewsey's gushing one.
"If you don't go away," she said gravely, "I will personally rip your head off and fill it with snakes."
"There!" said Nanny Ogg. "There's lots of poor children in Klatch that'd be grateful for a curse like that."
Pewsey's little face, after a second or two of uncertainty, split into a pumpkin grin.
"Funny lady," he said.
Doing whats right
There actually several places this comes up in the witches books:
"The trouble is, you see, that if you do know Right from Wrong, you can't choose Wrong. You just can't do it and live. So.. if I was a bad witch I could make Mister Salzella's muscles turn against his bones and break them where he stood... if I was bad. I could do things inside his head, change the shape he thinks he is, and he'd be down on what had been his knees and begging to be turned into a frog... if I was bad. I could leave him with a mind like a scrambled egg, listening to colors and hearing smells...if I was bad. Oh yes." There was another sigh, deeper and more heartfelt.
"But I can't do none of that stuff. That wouldn't be Right."
— Masquerade
"Granny was an old-fashioned witch. She didn’t do good for people, she did right by them. But Nanny knew that people don’t always appreciate right."
— The Sea and Little Fishes,
And some more that I can't find right now.