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•17mo 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!
Dokter
DokterOP•17mo ago
nop
Dominik
Dominik•17mo ago
interesting
Unknown User
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
Dokter
DokterOP•17mo ago
nop nop and nop
Unknown User
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
Dokter
DokterOP•17mo ago
Dominik and I just verified that in a screenshare xd
Unknown User
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
Dokter
DokterOP•17mo ago
String and the ID is fine
Unknown User
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
Dokter
DokterOP•17mo ago
ok
Shahar
Shahar•17mo ago
Maybe cache.get returns a promise? so maybe try to use .then
Unknown User
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
Dokter
DokterOP•17mo ago
that actually was the solution thanks @shahargut 🙂 Works like a charm now ;D
Unknown User
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
Shahar
Shahar•17mo ago
happy to hear 🙂
Dokter
DokterOP•17mo ago
idfk, it worked
Want results from more Discord servers?
Add your server