message fetching

const joinMessage = await client.channels.cache
.get(docsSetup.ArchiveChannel)
.messages.fetch(docsOpen.JoinMessageID);
const joinMessage = await client.channels.cache
.get(docsSetup.ArchiveChannel)
.messages.fetch(docsOpen.JoinMessageID);
unfortunately it doesnt properly fetch the message. I get folloing error: DiscordAPIError[10008]: Unknown Message The IDs are checked and are perfectly fine,
17 Replies
d.js toolkit
d.js toolkit•16mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Post the full error stack trace, not just the top part! - Show your code! - Explain what exactly your issue is. - Not a discord.js issue? Check out #useful-servers. - Issue solved? Press the button!
the
theOP•16mo ago
nop
Dominik
Dominik•16mo ago
interesting
Unknown User
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
the
theOP•16mo ago
nop nop and nop
Unknown User
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
the
theOP•16mo ago
Dominik and I just verified that in a screenshare xd
Unknown User
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
the
theOP•16mo ago
String and the ID is fine
Unknown User
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
the
theOP•16mo ago
ok
Shahar
Shahar•16mo ago
Maybe cache.get returns a promise? so maybe try to use .then
Unknown User
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
the
theOP•16mo ago
that actually was the solution thanks @shahargut 🙂 Works like a charm now ;D
Unknown User
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Shahar
Shahar•16mo ago
happy to hear 🙂
the
theOP•16mo ago
idfk, it worked
Want results from more Discord servers?
Add your server