I am trying to make my bot pin a fetched message when a command is run, however it runs into an error saying “.pin is not a function”. The code is below (ignore everything except the code that is in the else block)
if (primaryCommand == "pin") {
if (args[0] == null) {
missingArg(receivedMessage, "message id")
}
else {
receivedMessage.channel.fetchMessage("708042670240432168").pin()
}
}
}
EDIT: Image of error: