Message.startThread: Missing Access

I'm doing something like this:
const client = new Client({
intents: [
// How many flags do I need to start a new thread and attach it to the startmessage it's branching off of?
IntentsBitField.Flags.Guilds,
IntentsBitField.Flags.GuildMembers,
IntentsBitField.Flags.GuildMessages,
IntentsBitField.Flags.GuildMessageTyping,
IntentsBitField.Flags.GuildMessageReactions,
IntentsBitField.Flags.MessageContent,
IntentsBitField.Flags.GuildIntegrations,x
],
});

client.on('interactionCreate', async (interaction) => {
const announcement = await interaction.reply({
content: `## Announcement`,
fetchReply: true,
});

const thread = await announcement.startThread({
name: 'Announcement',
});
});
const client = new Client({
intents: [
// How many flags do I need to start a new thread and attach it to the startmessage it's branching off of?
IntentsBitField.Flags.Guilds,
IntentsBitField.Flags.GuildMembers,
IntentsBitField.Flags.GuildMessages,
IntentsBitField.Flags.GuildMessageTyping,
IntentsBitField.Flags.GuildMessageReactions,
IntentsBitField.Flags.MessageContent,
IntentsBitField.Flags.GuildIntegrations,x
],
});

client.on('interactionCreate', async (interaction) => {
const announcement = await interaction.reply({
content: `## Announcement`,
fetchReply: true,
});

const thread = await announcement.startThread({
name: 'Announcement',
});
});
And I'm getting a response like this:
DiscordAPIError[50001]: Missing Access
at ... {
requestBody: {
files: undefined,
json: {
name: 'Announcement',
auto_archive_duration: undefined,
type: 11,
invitable: undefined,
rate_limit_per_user: undefined
}
},
rawError: { message: 'Missing Access', code: 50001 },
code: 50001,
status: 403,
method: 'POST',
url: 'https://discord.com/api/v10/channels/.../messages/.../threads'
}
DiscordAPIError[50001]: Missing Access
at ... {
requestBody: {
files: undefined,
json: {
name: 'Announcement',
auto_archive_duration: undefined,
type: 11,
invitable: undefined,
rate_limit_per_user: undefined
}
},
rawError: { message: 'Missing Access', code: 50001 },
code: 50001,
status: 403,
method: 'POST',
url: 'https://discord.com/api/v10/channels/.../messages/.../threads'
}
My PermissionsBitField looks like this:
PermissionsBitField { bitfield: 560750900276855n }
PermissionsBitField { bitfield: 560750900276855n }
4 Replies
d.js toolkit
d.js toolkit10mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
d.js docs
d.js docs10mo ago
guide Popular Topics: Implicit permissions read more
주체사상공부모임 위원장 매트
Omg, the bot's role was literally not allowed to view the channel. Thanks for the hint! I am unable to mark this post as solved though?
Danial
Danial10mo ago
You should be able to now