#Button clicked inside forum thread returns missing access
19 messages · Page 1 of 1 (latest)
• 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.
the bot have no access to the channel u are fetching probly cus it has no ViewChannel perm
I can see it on the channel list on the side though
ye u can, but not ur bot
show the full err
^
DiscordAPIError[50001]: Missing Access
at SequentialHandler.runRequest (C:\Users\Freud\Documents\VHDiscord\node_modules\@discordjs\rest\dist\index.js:667:15)
at async SequentialHandler.queueRequest (C:\Users\Freud\Documents\VHDiscord\node_modules\@discordjs\rest\dist\index.js:464:14)
at async REST.request (C:\Users\Freud\Documents\VHDiscord\node_modules\@discordjs\rest\dist\index.js:910:22)
at async GuildChannelManager.fetch (C:\Users\ Freud\Documents\VHDiscord\node_modules\discord.js\src\managers\GuildChannelManager.js:378:20) {
requestBody: { files: undefined, json: undefined },
rawError: { message: 'Missing Access', code: 50001 },
code: 50001,
status: 403,
method: 'GET',
url: 'https://discord.com/api/v10/channels/1046424894293934110'
}```
is 1046424894293934110, the id of the thread?
u probly fetching some other channel, that ur bot has no access to
ohhh
thats it thanks!
(interaction.channel as ThreadChannel).setArchived(true)
}``` TS is forcing me to define it as thread channel, is there a reason why?
isThread is a method