Closed BestMordaEver closed 6 months ago
Permissions object returned by Member:getPermissions is mostly incomplete if a channel argument is passed. Example
channel
print(guild.me:getPermissions()) -- Permissions: 140742071708752 (addReactions, connect, embedLinks, manageChannels, manageMessages, manageRoles, moveMembers, readMessages, requestToSpeak, sendMessages, speak) print(guild.me:getPermissions(channel)) -- Permissions: 1049600 (connect, readMessages) print(channel:getPermissionOverwriteFor(guild.me).allowedPermissions) -- 1049600 print(channel:getPermissionOverwriteFor(guild.me).deniedPermissions) -- 0
Issue was introduced 6493e89 - permissions1:complement(permissions2) replaced most instances of band(permissions1, bnot(permissions2)). In complement, the binary operation is !a & b instead of a & !b
permissions1:complement(permissions2)
band(permissions1, bnot(permissions2))
complement
!a & b
a & !b
Permissions object returned by Member:getPermissions is mostly incomplete if a
channel
argument is passed. ExampleIssue was introduced 6493e89 -
permissions1:complement(permissions2)
replaced most instances ofband(permissions1, bnot(permissions2))
. Incomplement
, the binary operation is!a & b
instead ofa & !b