The spell-check application of most word processing software programs would not catch a slip-up of these two words. Spell-check is looking for words that aren’t in its dictionary, and words that resemble words in its dictionary but are possibly spelled wrong. Spell-check isn’t perfect. It doesn’t know and can’t guess what word you wanted or what word you meant, it can only judge the words on the page. If you used words that are all spelled correctly, it gives you a pass anyway.
Autocorrect suggests words that start with the same letters. It’s suggesting what word you may want to save time, but quite often, its suggestions are pretty off base. They don’t help you out, but they do make you laugh.
Duty is a noun. It means a task or obligation that must be fulfilled.
Doody is slang. It’s a synonym for feces or poo, and it’s often associated with very small children learning to use the toilet instead of their diaper.
The following story uses both words correctly:
Dutch was despondent as head of his neighborhood’s HOA. Too many pet owners didn’t feel it was their duty to pick up their pets’ doodies.
TRIVIA: Back in early days of US television, there was a puppet called “Howdy Doody.” He was a cowboy with his human ventriloquist, Buffalo Bill, and other people and animal friends. Howdy’s name didn’t mean “hello poo,” but a Southwestern US spin on “how do you do/howdy do (how are you).” This was one of the few shows on television aimed at children at that time, so it’s a treasured memory of children of the late 1940s-early 1960s.