rawError: { message: 'Missing Permissions', code: 50013 },

I'm not quite sure what it means? This error stems from me sending an embed, with content in the message along with the embed. any sort of message, I've tested things like 'test' and '@ everyone' and i get the same error, it's seeming to stem from having no perms to send content w/ embeds? I've checked the channels. The bot's role has all the perms, the channel also has it's own individual perms for the bot.
12 Replies
d.js toolkit
d.js toolkit13mo 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!
Tj
TjOP13mo ago
14.14.1 btw
const embed = new EmbedBuilder()
.setColor(Embed.Colors.successcolor)
.setTitle("The :goat: is streaming, check em' out")
.setDescription(`Streamer: <@${userId}>`)
.addFields([
{ name: "Stream URL", value: streamUrl, inline: false }
]);

advertiseChannel.send({
content: 'testme',
embeds: [embed],
});

interaction.reply({
content: "Your stream has been advertised!",
ephemeral: true
});
},
};
const embed = new EmbedBuilder()
.setColor(Embed.Colors.successcolor)
.setTitle("The :goat: is streaming, check em' out")
.setDescription(`Streamer: <@${userId}>`)
.addFields([
{ name: "Stream URL", value: streamUrl, inline: false }
]);

advertiseChannel.send({
content: 'testme',
embeds: [embed],
});

interaction.reply({
content: "Your stream has been advertised!",
ephemeral: true
});
},
};
Here's the full error
DiscordAPIError[50013]: Missing Permissions
at handleErrors (/home/tjtaylor/horror/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (/home/tjtaylor/horror/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:1120:23)
at async SequentialHandler.queueRequest (/home/tjtaylor/horror/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:953:14)
at async _REST.request (/home/tjtaylor/horror/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async TextChannel.send (/home/tjtaylor/horror/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:155:15) {
requestBody: {
files: [],
json: {
content: '@horrorontop',
tts: false,
nonce: undefined,
embeds: [Array],
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: [Object],
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined
}
},
rawError: { message: 'Missing Permissions', code: 50013 },
code: 50013,
status: 403,
method: 'POST',
url: 'https://discord.com/api/v10/channels/733469123622994091/messages'
}
DiscordAPIError[50013]: Missing Permissions
at handleErrors (/home/tjtaylor/horror/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (/home/tjtaylor/horror/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:1120:23)
at async SequentialHandler.queueRequest (/home/tjtaylor/horror/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:953:14)
at async _REST.request (/home/tjtaylor/horror/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async TextChannel.send (/home/tjtaylor/horror/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:155:15) {
requestBody: {
files: [],
json: {
content: '@horrorontop',
tts: false,
nonce: undefined,
embeds: [Array],
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: [Object],
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined
}
},
rawError: { message: 'Missing Permissions', code: 50013 },
code: 50013,
status: 403,
method: 'POST',
url: 'https://discord.com/api/v10/channels/733469123622994091/messages'
}
axiprime
axiprime13mo ago
Your bot does not see or is unable/not allowed to send message in advertiseChannel
Tj
TjOP13mo ago
idk how that could be remotely true it has every allow or manage perm on the list I'll check tho.
axiprime
axiprime13mo ago
That would be the only reason since the reply is ephemeral
Tj
TjOP13mo ago
the reply to the user is ephemeral yes the missing permissions thing confuses me, it has every perm I could give it
axiprime
axiprime13mo ago
Try to put it admin.
Tj
TjOP13mo ago
This even works in the advertised channel
No description
Tj
TjOP13mo ago
it has admin aswell
axiprime
axiprime13mo ago
The reply will work since it is an ephemeral and it does bypass permissions.
Tj
TjOP13mo ago
I've tried a bunch of different perm things, like it's role (and it's spot in the heiarchy) and channel perms
kin.ts
kin.ts13mo ago
console.log(advertiseChannel.permissionsFor(interaction.client.user).has(['ViewChannel', 'SendMessages', 'EmbedLinks'])) you're right
Want results from more Discord servers?
Add your server