#Button clicked inside forum thread returns missing access

19 messages · Page 1 of 1 (latest)

cursive nacelle
#
  code: 50001,
  status: 403,
  method: 'GET',
  url: 'https://discord.com/api/v10/channels/1046424894293934110'```

When I click on a button inside a forum thread I get this error
neon bobcat
#

• 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.

viral notch
#

the bot have no access to the channel u are fetching probly cus it has no ViewChannel perm

cursive nacelle
#

I can see it on the channel list on the side though

rocky magnet
#

can we see the code you're doing

#

or attempting to do

viral notch
#

this isn't code issue

#

he is fetching a channel as seen by the error he sent

viral notch
cursive nacelle
#

Its in the channel list

viral notch
#

show the full err

cursive nacelle
#
              ^

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'
}```
viral notch
#

is 1046424894293934110, the id of the thread?

#

u probly fetching some other channel, that ur bot has no access to

cursive nacelle
#

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?
viral notch
#

isThread is a method