Closed presentday-presenttime closed 8 years ago
message.channel.permissionsOf(message.author).serialize()
gives { createInstantInvite: true, kickMembers: true, banMembers: true, managePermissions: true, manageChannel: true, manageServer: true, readMessages: true, sendMessages: true, sendTTSMessages: true, manageMessages: true, embedLinks: true, attachFiles: true, readMessageHistory: true, mentionEveryone: true, voiceConnect: true, voiceSpeak: true, voiceMuteMembers: true, voiceDeafenMembers: true, voiceMoveMembers: true, voiceUseVAD: true }
{ createInstantInvite: true, kickMembers: true, banMembers: true, managePermissions: true, manageChannel: true, manageServer: true, readMessages: true, sendMessages: true, sendTTSMessages: true, manageMessages: true, embedLinks: true, attachFiles: true, readMessageHistory: true, mentionEveryone: true, voiceConnect: true, voiceSpeak: true, voiceMuteMembers: true, voiceDeafenMembers: true, voiceMoveMembers: true, voiceUseVAD: true }
if the message author is allowed to Manage roles, even if all other permissions are false.
The line that's causing this https://github.com/hydrabolt/discord.js/blob/3f47c3e5cc1e59d10febbf652ab944a0ee3a4d29/src/Structures/ChannelPermissions.js#L35-L40
Old code. Should be administrator
message.channel.permissionsOf(message.author).serialize()
gives
{ createInstantInvite: true, kickMembers: true, banMembers: true, managePermissions: true, manageChannel: true, manageServer: true, readMessages: true, sendMessages: true, sendTTSMessages: true, manageMessages: true, embedLinks: true, attachFiles: true, readMessageHistory: true, mentionEveryone: true, voiceConnect: true, voiceSpeak: true, voiceMuteMembers: true, voiceDeafenMembers: true, voiceMoveMembers: true, voiceUseVAD: true }
if the message author is allowed to Manage roles, even if all other permissions are false.