diff options
| author | Rapptz <[email protected]> | 2016-01-06 12:17:36 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2016-01-06 12:18:48 -0500 |
| commit | c8344af1033a992cba94a7969188761a283117f0 (patch) | |
| tree | b795751d876a2cc7e444aa4ff8c0363f7b374bf5 | |
| parent | Update README to use Python 3.5. (diff) | |
| download | discord.py-c8344af1033a992cba94a7969188761a283117f0.tar.xz discord.py-c8344af1033a992cba94a7969188761a283117f0.zip | |
Add Member.permissions_in.
Fixes #63
| -rw-r--r-- | discord/member.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/discord/member.py b/discord/member.py index 2248e3d5..c788d82e 100644 --- a/discord/member.py +++ b/discord/member.py @@ -103,3 +103,19 @@ class Member(User): # we switched channels if self.voice_channel is not None: self.voice_channel.voice_members.append(self) + + def permissions_in(self, channel): + """An alias for :meth:`Channel.permissions_for`. + + Basically equivalent to: + + .. code-block:: python + + channel.permissions_for(self) + + Parameters + ----------- + channel + The channel to check your permissions for. + """ + return channel.permissions_for(self) |