Garmaine Staff asked 4 months ago

I have searched for this question and the hundreds of responses that I've found only speak of this in the terms of within the message event E.G.

client.on('message', message => {
   message.id // <<< I don't think this is the right code for it but that's not the point I'm making so....
});

However, I need to access a message via its id without using the message event. Specifically, I need to within the messageReactionAdd event however I would much rather learn how to get it from the client because I've needed to do the same thing in the past as well (but instead I was forced to redesign my original plans). This is the code that I've tried using but it just won't work:

client.channels.cache.get("Channel_Id").messages.fetch("Message_Id");

I was led to this code string from a different project where I found the first message in a channel:

client.channels.cache.get("Channel_Id").messages.fetch({ limit: 1 }).then(messages => {var lastMessage = messages.first();});

Is this even possible? I find it a little strange that there isn't an easy way to just target a message directly without jumping through a bunch of hoops (like client.messages.fetch("Message_Id")). Any help would be much appreciated.