mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-05 17:36:15 +00:00
Change certain sequences to use a special proxy type instead of list
This is to speed up cases where someone is just querying the length of the underlying sequence. If anything else is done to the sequence then it is copied from the original iterator. This change should be mostly transparent.
This commit is contained in:
@ -347,7 +347,7 @@ class Role(Hashable):
|
||||
@property
|
||||
def members(self) -> List[Member]:
|
||||
"""List[:class:`Member`]: Returns all the members with this role."""
|
||||
all_members = self.guild.members
|
||||
all_members = list(self.guild._members.values())
|
||||
if self.is_default():
|
||||
return all_members
|
||||
|
||||
|
Reference in New Issue
Block a user