Dugs do have a limited vocabulary of words they understand, but are far, far more attuned to the tone of what's being said, rather than what's actually being said.
Which is why you see some idiot members of the public failing to control their dogs when it's appropriate to, because they're giving "obey me" commands in a tone of voice that they also use for "would you like a biscuit?"