50001 and 50013

I am getting a couple of issues related to this .. Node : v17.9.1 d.js : 14.11.0
2 Replies
d.js toolkit
d.js toolkit2y ago
- 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. - Issue solved? Press the button!
username 0_0
username 0_0OP2y ago
[antiCrash] :: Unhandled Rejection/Catch
DiscordAPIError[50013]: Missing Permissions
at handleErrors (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:640:13)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SequentialHandler.runRequest (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:1021:23)
at async SequentialHandler.queueRequest (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:862:14)
at async REST.request (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:1387:22)
at async TextChannel.send (/home/container/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:162:15)
at async _Player.module.exports (/home/container/player-events/playerStart.js:42:22) {
requestBody: {
files: [],
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: [Array],
components: [Array],
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
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/1130925470515478640/messages'
}
[antiCrash] :: Unhandled Rejection/Catch
DiscordAPIError[50013]: Missing Permissions
at handleErrors (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:640:13)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SequentialHandler.runRequest (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:1021:23)
at async SequentialHandler.queueRequest (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:862:14)
at async REST.request (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:1387:22)
at async TextChannel.send (/home/container/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:162:15)
at async _Player.module.exports (/home/container/player-events/playerStart.js:42:22) {
requestBody: {
files: [],
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: [Array],
components: [Array],
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
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/1130925470515478640/messages'
}
i'm getting this error but in playerStart.js line 42
if(queue.metadata.interaction.guild.members.me.permissionsIn(queue.metadata.interaction.channel).has([PermissionsBitField.Flags.SendMessages , PermissionsBitField.Flags.ViewChannel])
) {
const newTrack = await queue.metadata.interaction.channel
.send({
embeds: [embed1] ,
components: [row],
fetchReply: true
})
}
if(queue.metadata.interaction.guild.members.me.permissionsIn(queue.metadata.interaction.channel).has([PermissionsBitField.Flags.SendMessages , PermissionsBitField.Flags.ViewChannel])
) {
const newTrack = await queue.metadata.interaction.channel
.send({
embeds: [embed1] ,
components: [row],
fetchReply: true
})
}
where queue.metadata : { interaction : <Interaction> } i dont understand why it would execute channel.send() if theres no permission!! from the error i received, i tried client.channels.cache.get('').permissionsFor(client.user).serialize() and this is what i got
{
CreateInstantInvite: false,
KickMembers: true,
BanMembers: true,
Administrator: false,
ManageChannels: false,
ManageGuild: true,
AddReactions: false,
ViewAuditLog: true,
PrioritySpeaker: true,
Stream: true,
ViewChannel: true,
SendMessages: true,
SendTTSMessages: false,
ManageMessages: false,
EmbedLinks: false,
AttachFiles: false,
ReadMessageHistory: true,
MentionEveryone: false,
UseExternalEmojis: false,
ViewGuildInsights: false,
Connect: true,
Speak: true,
MuteMembers: true,
DeafenMembers: true,
MoveMembers: true,
UseVAD: true,
ChangeNickname: true,
ManageNicknames: true,
ManageRoles: false,
ManageWebhooks: false,
ManageEmojisAndStickers: true,
ManageGuildExpressions: true,
UseApplicationCommands: false,
RequestToSpeak: true,
ManageEvents: false,
ManageThreads: false,
CreatePublicThreads: false,
CreatePrivateThreads: false,
UseExternalStickers: false,
SendMessagesInThreads: false,
UseEmbeddedActivities: true,
ModerateMembers: true,
ViewCreatorMonetizationAnalytics: false,
UseSoundboard: true,
UseExternalSounds: true,
SendVoiceMessages: false
}
{
CreateInstantInvite: false,
KickMembers: true,
BanMembers: true,
Administrator: false,
ManageChannels: false,
ManageGuild: true,
AddReactions: false,
ViewAuditLog: true,
PrioritySpeaker: true,
Stream: true,
ViewChannel: true,
SendMessages: true,
SendTTSMessages: false,
ManageMessages: false,
EmbedLinks: false,
AttachFiles: false,
ReadMessageHistory: true,
MentionEveryone: false,
UseExternalEmojis: false,
ViewGuildInsights: false,
Connect: true,
Speak: true,
MuteMembers: true,
DeafenMembers: true,
MoveMembers: true,
UseVAD: true,
ChangeNickname: true,
ManageNicknames: true,
ManageRoles: false,
ManageWebhooks: false,
ManageEmojisAndStickers: true,
ManageGuildExpressions: true,
UseApplicationCommands: false,
RequestToSpeak: true,
ManageEvents: false,
ManageThreads: false,
CreatePublicThreads: false,
CreatePrivateThreads: false,
UseExternalStickers: false,
SendMessagesInThreads: false,
UseEmbeddedActivities: true,
ModerateMembers: true,
ViewCreatorMonetizationAnalytics: false,
UseSoundboard: true,
UseExternalSounds: true,
SendVoiceMessages: false
}
both ViewChannel and SendMessage is true . but then why would it give this error ohh not even as interaction replies? no i'm just asking if i've to check when i am sending a interaction reply too editReply and followUp need permission? i thought all them could be done with everyone permission is this the same for interaction replies? because what if a person invites the bot with no permissions and the the everyone role doesnt have the permission either.... wouldn't it result in a 403 error? is there a web page that i can look into about this? 50013 missing permission errors have been fixed for me now.. i had to check EmbedLinks ... the other issue i'm having is :
DiscordAPIError[50001]: Missing Access
at handleErrors (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:640:13)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SequentialHandler.runRequest (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:1021:23)
at async SequentialHandler.queueRequest (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:862:14)
at async REST.request (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:1387:22)
at async TextChannel.send (/home/container/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:162:15) {
requestBody: {
files: [],
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: [Array],
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined
}
},
rawError: { message: 'Missing Access', code: 50001 },
code: 50001,
status: 403,
method: 'POST',
url: 'https://discord.com/api/v10/channels/1011369414727303238/messages'
}
DiscordAPIError[50001]: Missing Access
at handleErrors (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:640:13)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SequentialHandler.runRequest (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:1021:23)
at async SequentialHandler.queueRequest (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:862:14)
at async REST.request (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:1387:22)
at async TextChannel.send (/home/container/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:162:15) {
requestBody: {
files: [],
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: [Array],
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined
}
},
rawError: { message: 'Missing Access', code: 50001 },
code: 50001,
status: 403,
method: 'POST',
url: 'https://discord.com/api/v10/channels/1011369414727303238/messages'
}
i tried fetching the channel and it gives an error again.DiscordAPIError[50001]: Missing Access that would mean the bot is not in the guild if i'm right... then why would it try to send a message though this is confusing.. i got a similar error of 50001 rn and i did the same and logged the permissions
{
CreateInstantInvite: true,
KickMembers: true,
BanMembers: true,
Administrator: true,
ManageChannels: true,
ManageGuild: true,
AddReactions: true,
ViewAuditLog: true,
PrioritySpeaker: true,
Stream: true,
ViewChannel: true,
SendMessages: true,
SendTTSMessages: true,
ManageMessages: true,
EmbedLinks: true,
AttachFiles: true,
ReadMessageHistory: true,
MentionEveryone: true,
UseExternalEmojis: true,
ViewGuildInsights: true,
Connect: true,
Speak: true,
MuteMembers: true,
DeafenMembers: true,
MoveMembers: true,
UseVAD: true,
ChangeNickname: true,
ManageNicknames: true,
ManageRoles: true,
ManageWebhooks: true,
ManageEmojisAndStickers: true,
ManageGuildExpressions: true,
UseApplicationCommands: true,
RequestToSpeak: true,
ManageEvents: true,
ManageThreads: true,
CreatePublicThreads: true,
CreatePrivateThreads: true,
UseExternalStickers: true,
SendMessagesInThreads: true,
UseEmbeddedActivities: true,
ModerateMembers: true,
ViewCreatorMonetizationAnalytics: true,
UseSoundboard: true,
UseExternalSounds: true,
SendVoiceMessages: true
}
{
CreateInstantInvite: true,
KickMembers: true,
BanMembers: true,
Administrator: true,
ManageChannels: true,
ManageGuild: true,
AddReactions: true,
ViewAuditLog: true,
PrioritySpeaker: true,
Stream: true,
ViewChannel: true,
SendMessages: true,
SendTTSMessages: true,
ManageMessages: true,
EmbedLinks: true,
AttachFiles: true,
ReadMessageHistory: true,
MentionEveryone: true,
UseExternalEmojis: true,
ViewGuildInsights: true,
Connect: true,
Speak: true,
MuteMembers: true,
DeafenMembers: true,
MoveMembers: true,
UseVAD: true,
ChangeNickname: true,
ManageNicknames: true,
ManageRoles: true,
ManageWebhooks: true,
ManageEmojisAndStickers: true,
ManageGuildExpressions: true,
UseApplicationCommands: true,
RequestToSpeak: true,
ManageEvents: true,
ManageThreads: true,
CreatePublicThreads: true,
CreatePrivateThreads: true,
UseExternalStickers: true,
SendMessagesInThreads: true,
UseEmbeddedActivities: true,
ModerateMembers: true,
ViewCreatorMonetizationAnalytics: true,
UseSoundboard: true,
UseExternalSounds: true,
SendVoiceMessages: true
}
hmm the next one i check too has the same permission... all are true yes... there is a gap from when i get the error and try to log this though i fetched the channel using the id and logged permissionsFor(client.user).serialize() someone..?
Want results from more Discord servers?
Add your server