I feel like all my research on this topic lead me only to outdated solutions.
With my Discord.js bot, I have a command. For it to work I need to get the last message in a channel right before the command. I am struggling with all those fetches and partials and cache etc.
Sometimes it works when I post the message right after my bot started and use the command on it, but if I restart my bot it seems to get the wrong message. Also, what about messages that are older than 14 days?
I can't really provide code because it's just one line, like:
const message = msg.channel.messages. ...