Unarchive thread error

I used to make a thread system but when i try to unarchive a thread i got error saying canno read properties https://pastebin.com/NqUKUQ8c
Pastebin
//I save the id as button value and it return correctconst base = a...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
8 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
CanineData
CanineData2y ago
Iirc archived threads aren’t cached Try fetching instead
!Delta!
!Delta!OP2y ago
okay let me check
let archivedThreads = await channel.threads.fetchArchived()
let thread = archivedThreads.threads.get(id)


thread.setArchived(false)
let archivedThreads = await channel.threads.fetchArchived()
let thread = archivedThreads.threads.get(id)


thread.setArchived(false)
Still the same
d.js docs
d.js docs2y ago
method ThreadManager#fetch() Obtains a thread from Discord, or the channel cache if it's already available.
!Delta!
!Delta!OP2y ago
that work perfect i got also a other question some time when i used to message.guild.member.cache.get(id) and put them in embed they displayed as numbers
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
!Delta!
!Delta!OP2y ago
Oh okay Ty
CanineData
CanineData2y ago
It's because mentions in embeds aren't actually members, it only pulls the user from the cache and renders it as a mention if found
Want results from more Discord servers?
Add your server