mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
Add TextChannel.members to get members that can see a channel.
This commit is contained in:
parent
cf40e94af6
commit
39d65305a3
@ -109,6 +109,11 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
|
||||
|
||||
permissions_for.__doc__ = discord.abc.GuildChannel.permissions_for.__doc__
|
||||
|
||||
@property
|
||||
def members(self):
|
||||
"""Returns a list of :class:`Member` that can see this channel."""
|
||||
return [m for m in self.guild.members if self.permissions_for(m).read_messages]
|
||||
|
||||
@asyncio.coroutine
|
||||
def edit(self, **options):
|
||||
"""|coro|
|
||||
|
Loading…
x
Reference in New Issue
Block a user