Client not able to edit a channel even with all permissions

I'm trying to edit a channel's name, but keep getting told I'm "missing access" (don't have permission to edit the channel). Serialized permissions in the channel:
{
CreateInstantInvite: false,
KickMembers: true,
BanMembers: false,
Administrator: false,
ManageChannels: true,
ManageGuild: false,
AddReactions: true,
ViewAuditLog: false,
PrioritySpeaker: false,
Stream: false,
ViewChannel: true,
SendMessages: true,
SendTTSMessages: false,
ManageMessages: true,
EmbedLinks: true,
AttachFiles: true,
ReadMessageHistory: true,
MentionEveryone: false,
UseExternalEmojis: false,
ViewGuildInsights: false,
Connect: false,
Speak: false,
MuteMembers: false,
DeafenMembers: false,
MoveMembers: false,
UseVAD: false,
ChangeNickname: true,
ManageNicknames: false,
ManageRoles: true,
ManageWebhooks: false,
ManageEmojisAndStickers: false,
ManageGuildExpressions: false,
UseApplicationCommands: false,
RequestToSpeak: false,
ManageEvents: false,
ManageThreads: true,
CreatePublicThreads: false,
CreatePrivateThreads: true,
UseExternalStickers: false,
SendMessagesInThreads: false,
UseEmbeddedActivities: false,
ModerateMembers: false,
ViewCreatorMonetizationAnalytics: false,
UseSoundboard: true,
UseExternalSounds: true,
SendVoiceMessages: true
}
{
CreateInstantInvite: false,
KickMembers: true,
BanMembers: false,
Administrator: false,
ManageChannels: true,
ManageGuild: false,
AddReactions: true,
ViewAuditLog: false,
PrioritySpeaker: false,
Stream: false,
ViewChannel: true,
SendMessages: true,
SendTTSMessages: false,
ManageMessages: true,
EmbedLinks: true,
AttachFiles: true,
ReadMessageHistory: true,
MentionEveryone: false,
UseExternalEmojis: false,
ViewGuildInsights: false,
Connect: false,
Speak: false,
MuteMembers: false,
DeafenMembers: false,
MoveMembers: false,
UseVAD: false,
ChangeNickname: true,
ManageNicknames: false,
ManageRoles: true,
ManageWebhooks: false,
ManageEmojisAndStickers: false,
ManageGuildExpressions: false,
UseApplicationCommands: false,
RequestToSpeak: false,
ManageEvents: false,
ManageThreads: true,
CreatePublicThreads: false,
CreatePrivateThreads: true,
UseExternalStickers: false,
SendMessagesInThreads: false,
UseEmbeddedActivities: false,
ModerateMembers: false,
ViewCreatorMonetizationAnalytics: false,
UseSoundboard: true,
UseExternalSounds: true,
SendVoiceMessages: true
}
16 Replies
d.js toolkit
d.js toolkit17mo 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!
elseif
elseifOP17mo ago
Error: (DiscordAPIError[50001]: Missing Access)
/home/container/node_modules/@discordjs/rest/dist/index.js:640
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
^
DiscordAPIError[50001]: Missing Access
at handleErrors (/home/container/node_modules/@discordjs/rest/dist/index.js:640:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (/home/container/node_modules/@discordjs/rest/dist/index.js:1021:23)
at async SequentialHandler.queueRequest (/home/container/node_modules/@discordjs/rest/dist/index.js:862:14)
at async REST.request (/home/container/node_modules/@discordjs/rest/dist/index.js:1387:22)
at async GuildChannelManager.edit (/home/container/node_modules/discord.js/src/managers/GuildChannelManager.js:299:21) {
requestBody: {
files: undefined,
json: {
name: 'Members: 365',
type: undefined,
topic: undefined,
nsfw: undefined,
bitrate: 64000,
user_limit: 0,
rtc_region: null,
video_quality_mode: undefined,
parent_id: undefined,
lock_permissions: undefined,
rate_limit_per_user: undefined,
default_auto_archive_duration: undefined,
permission_overwrites: undefined,
available_tags: undefined,
default_reaction_emoji: undefined,
default_thread_rate_limit_per_user: undefined,
flags: undefined,
default_sort_order: undefined,
default_forum_layout: undefined
}
},
rawError: { message: 'Missing Access', code: 50001 },
code: 50001,
status: 403,
method: 'PATCH',
url: 'https://discord.com/api/v10/channels/996227371692724264'
}
/home/container/node_modules/@discordjs/rest/dist/index.js:640
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
^
DiscordAPIError[50001]: Missing Access
at handleErrors (/home/container/node_modules/@discordjs/rest/dist/index.js:640:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (/home/container/node_modules/@discordjs/rest/dist/index.js:1021:23)
at async SequentialHandler.queueRequest (/home/container/node_modules/@discordjs/rest/dist/index.js:862:14)
at async REST.request (/home/container/node_modules/@discordjs/rest/dist/index.js:1387:22)
at async GuildChannelManager.edit (/home/container/node_modules/discord.js/src/managers/GuildChannelManager.js:299:21) {
requestBody: {
files: undefined,
json: {
name: 'Members: 365',
type: undefined,
topic: undefined,
nsfw: undefined,
bitrate: 64000,
user_limit: 0,
rtc_region: null,
video_quality_mode: undefined,
parent_id: undefined,
lock_permissions: undefined,
rate_limit_per_user: undefined,
default_auto_archive_duration: undefined,
permission_overwrites: undefined,
available_tags: undefined,
default_reaction_emoji: undefined,
default_thread_rate_limit_per_user: undefined,
flags: undefined,
default_sort_order: undefined,
default_forum_layout: undefined
}
},
rawError: { message: 'Missing Access', code: 50001 },
code: 50001,
status: 403,
method: 'PATCH',
url: 'https://discord.com/api/v10/channels/996227371692724264'
}
Intents: GuildMessages, Guilds, and MessageContent Code:
member.guild.channels.cache.get('996227371692724264').edit({ name: `Members: ${member.guild.memberCount}` })
member.guild.channels.cache.get('996227371692724264').edit({ name: `Members: ${member.guild.memberCount}` })
𝓟𝓸𝓵𝓲𝓼𝓱𝓚𝓮𝓫𝓪𝓫 | a.k.a Kebab
you sure the id is of the right channel?
elseif
elseifOP17mo ago
yes. the permissions are also for that channel
SpecialSauce
SpecialSauce17mo ago
How are we logging the permissions?
𝓟𝓸𝓵𝓲𝓼𝓱𝓚𝓮𝓫𝓪𝓫 | a.k.a Kebab
<Channel>.permissionsFor(bot)
elseif
elseifOP17mo ago
console.log(member.guild.channels.cache.get('996227371692724264').permissionsFor(member.guild.members.me).serialize())
member.guild.channels.cache.get('996227371692724264').edit({ name: `Members: ${member.guild.memberCount}` })
console.log(member.guild.channels.cache.get('996227371692724264').permissionsFor(member.guild.members.me).serialize())
member.guild.channels.cache.get('996227371692724264').edit({ name: `Members: ${member.guild.memberCount}` })
i've tried fetching the channel as well
𝓟𝓸𝓵𝓲𝓼𝓱𝓚𝓮𝓫𝓪𝓫 | a.k.a Kebab
could u log the channel type?
elseif
elseifOP17mo ago
1. channel type doesn't matter 2. i can tell you from the ID and how i got it that the channel is a voice channel
𝓟𝓸𝓵𝓲𝓼𝓱𝓚𝓮𝓫𝓪𝓫 | a.k.a Kebab
btw, guild.memberCount gives a numer that is not accurate
elseif
elseifOP17mo ago
ok
elseif
elseifOP17mo ago
also,
SpecialSauce
SpecialSauce17mo ago
<#996227371692724264> is the correct channel?
edocsil
edocsil17mo ago
Channel type does matter because Connect is required to change the name of voice channels And since your channel name has a space in it, I'm guessing that it is and that's the issue
For voice and stage channels, denying the CONNECT permission also implicitly denies other permissions such as MANAGE_CHANNEL.
https://discord.com/developers/docs/topics/permissions#implicit-permissions
𝓟𝓸𝓵𝓲𝓼𝓱𝓚𝓮𝓫𝓪𝓫 | a.k.a Kebab
this is stupid, discord trying to cut corners lol
elseif
elseifOP17mo ago
yeah what okay well tysm
Want results from more Discord servers?
Add your server