fredi-68 / Ram

ProtOS Discord Bot (Codename: Ram) DISCLAIMER: This repository is a mirror of my local network source control. Information may or may not be inaccurate. Updates only whenever I can be bothered.
0 stars 0 forks source link

+skip requires admin permissions #35

Closed fredi-68 closed 5 years ago

fredi-68 commented 5 years ago

Change +skip permission requirements to "move members between channels" instead of admin

fredi-68 commented 5 years ago

fixed, +skip now checks for move_members instead of administrator

fredi-68 commented 5 years ago

so I changed the required permissions... but for some reason the command can still not be executed by members who don't have the admin permission. More testing required.

fredi-68 commented 5 years ago

hmmm I think I may know what is happening here. Looks like member.permissions_in() might only give us the permission overrides for this channel and not the effective permissions... in which case we'd have to combine it with the role permissions to get them

fredi-68 commented 5 years ago

nope, permissions_in() already resolves to the effective permissions in the channel... weird

fredi-68 commented 5 years ago

Turns out the problem was due to a small inconsistency in discords own permission system. If you try to access a members permission set on a text channel, all voice related permission seem to always be set to False and vice versa. Fixed by checking the union of effective permissions and server permissions if given.