Documentation fixes for permission.
This commit is contained in:
parent
bf11bb4b4f
commit
1ec7daf372
@ -94,14 +94,14 @@ class Permissions:
|
|||||||
return self._perm_iterator()
|
return self._perm_iterator()
|
||||||
|
|
||||||
def is_subset(self, other):
|
def is_subset(self, other):
|
||||||
"""Returns True if other has the same or fewer permissions as self."""
|
"""Returns True if self has the same or fewer permissions as other."""
|
||||||
if isinstance(other, Permissions):
|
if isinstance(other, Permissions):
|
||||||
return (self.value & other.value) == self.value
|
return (self.value & other.value) == self.value
|
||||||
else:
|
else:
|
||||||
raise TypeError("cannot compare {} with {}".format(self.__class__.__name__, other.__class__name))
|
raise TypeError("cannot compare {} with {}".format(self.__class__.__name__, other.__class__name))
|
||||||
|
|
||||||
def is_superset(self, other):
|
def is_superset(self, other):
|
||||||
"""Returns True if other has the same or more permissions as self."""
|
"""Returns True if self has the same or more permissions as other."""
|
||||||
if isinstance(other, Permissions):
|
if isinstance(other, Permissions):
|
||||||
return (self.value | other.value) == self.value
|
return (self.value | other.value) == self.value
|
||||||
else:
|
else:
|
||||||
@ -138,7 +138,7 @@ class Permissions:
|
|||||||
True and the guild-specific ones set to False. The guild-specific
|
True and the guild-specific ones set to False. The guild-specific
|
||||||
permissions are currently:
|
permissions are currently:
|
||||||
|
|
||||||
- manager_guild
|
- manage_guild
|
||||||
- kick_members
|
- kick_members
|
||||||
- ban_members
|
- ban_members
|
||||||
- administrator
|
- administrator
|
||||||
|
Loading…
x
Reference in New Issue
Block a user