mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 20:28:38 +00:00
Remove User.permissions_in
This seemed to only cause confusion.
This commit is contained in:
parent
a8b3cfa592
commit
1209585de5
@ -461,27 +461,6 @@ class Member(discord.abc.Messageable, _BaseUser):
|
|||||||
|
|
||||||
return any(self._roles.has(role.id) for role in message.role_mentions)
|
return any(self._roles.has(role.id) for role in message.role_mentions)
|
||||||
|
|
||||||
def permissions_in(self, channel):
|
|
||||||
"""An alias for :meth:`abc.GuildChannel.permissions_for`.
|
|
||||||
|
|
||||||
Basically equivalent to:
|
|
||||||
|
|
||||||
.. code-block:: python3
|
|
||||||
|
|
||||||
channel.permissions_for(self)
|
|
||||||
|
|
||||||
Parameters
|
|
||||||
-----------
|
|
||||||
channel: :class:`abc.GuildChannel`
|
|
||||||
The channel to check your permissions for.
|
|
||||||
|
|
||||||
Returns
|
|
||||||
-------
|
|
||||||
:class:`Permissions`
|
|
||||||
The resolved permissions for the member.
|
|
||||||
"""
|
|
||||||
return channel.permissions_for(self)
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def top_role(self):
|
def top_role(self):
|
||||||
""":class:`Role`: Returns the member's highest role.
|
""":class:`Role`: Returns the member's highest role.
|
||||||
@ -502,8 +481,7 @@ class Member(discord.abc.Messageable, _BaseUser):
|
|||||||
This only takes into consideration the guild permissions
|
This only takes into consideration the guild permissions
|
||||||
and not most of the implied permissions or any of the
|
and not most of the implied permissions or any of the
|
||||||
channel permission overwrites. For 100% accurate permission
|
channel permission overwrites. For 100% accurate permission
|
||||||
calculation, please use either :meth:`permissions_in` or
|
calculation, please use :meth:`abc.GuildChannel.permissions_for`.
|
||||||
:meth:`abc.GuildChannel.permissions_for`.
|
|
||||||
|
|
||||||
This does take into consideration guild ownership and the
|
This does take into consideration guild ownership and the
|
||||||
administrator implication.
|
administrator implication.
|
||||||
|
@ -178,22 +178,6 @@ class BaseUser(_BaseUser):
|
|||||||
""":class:`str`: Returns a string that allows you to mention the given user."""
|
""":class:`str`: Returns a string that allows you to mention the given user."""
|
||||||
return f'<@{self.id}>'
|
return f'<@{self.id}>'
|
||||||
|
|
||||||
def permissions_in(self, channel):
|
|
||||||
"""An alias for :meth:`abc.GuildChannel.permissions_for`.
|
|
||||||
|
|
||||||
Basically equivalent to:
|
|
||||||
|
|
||||||
.. code-block:: python3
|
|
||||||
|
|
||||||
channel.permissions_for(self)
|
|
||||||
|
|
||||||
Parameters
|
|
||||||
-----------
|
|
||||||
channel: :class:`abc.GuildChannel`
|
|
||||||
The channel to check your permissions for.
|
|
||||||
"""
|
|
||||||
return channel.permissions_for(self)
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def created_at(self):
|
def created_at(self):
|
||||||
""":class:`datetime.datetime`: Returns the user's creation time in UTC.
|
""":class:`datetime.datetime`: Returns the user's creation time in UTC.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user