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 User15mo ago
Message Not Public
Sign In & Join Server To View
CanineData
CanineData15mo ago
Iirc archived threads aren’t cached Try fetching instead
!Delta!
!Delta!15mo 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 docs15mo ago
method ThreadManager#fetch() Obtains a thread from Discord, or the channel cache if it's already available.
!Delta!
!Delta!15mo 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 User15mo ago
Message Not Public
Sign In & Join Server To View
!Delta!
!Delta!15mo ago
Oh okay Ty
CanineData
CanineData15mo 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