Button clicked inside forum thread returns missing access

rawError: { message: 'Missing Access', code: 50001 },
code: 50001,
status: 403,
method: 'GET',
url: 'https://discord.com/api/v10/channels/1046424894293934110'
rawError: { message: 'Missing Access', code: 50001 },
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
11 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Freud
FreudOP2y ago
I can see it on the channel list on the side though
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Freud
FreudOP2y ago
Freud
FreudOP2y ago
Its in the channel list
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Freud
FreudOP2y ago
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
^

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'
}
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
^

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'
}
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Freud
FreudOP2y ago
ohhh thats it thanks!
if (interaction.channel?.isThread) {
(interaction.channel as ThreadChannel).setArchived(true)
}
if (interaction.channel?.isThread) {
(interaction.channel as ThreadChannel).setArchived(true)
}
TS is forcing me to define it as thread channel, is there a reason why?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Freud
FreudOP2y ago
ty ❤️
Want results from more Discord servers?
Add your server