is there a good way to respond to user dm once

Say a user dms my bot. I would like to respond to the user a specified message, if met the conditions:

If the specified message is different from the last message
If the last message does not exist
Was this page helpful?