message.delete is not a function (while deleting a reply to a command in DM)

await interaction.editReply(`Done! I counted to ${number}`)
                .then(message => setTimeout(() => message.delete(), 3000))


On server the reply message is getting deleted normally but when I do it to replies in DM it fails and the program stops. Gives the following error:

TypeError: message.delete is not a function


I would use
deleteReply()
but that does not work when I have edited the message with
editReply()
.
deleteReply()
works in DMs but only if I didn't edit the message.
Was this page helpful?