mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-11-06 00:12:56 +00:00
Deprecate non-bot methods
This commit is contained in:
@@ -25,6 +25,7 @@ DEALINGS IN THE SOFTWARE.
|
||||
"""
|
||||
|
||||
from .enums import RelationshipType, try_enum
|
||||
from . import utils
|
||||
|
||||
class Relationship:
|
||||
"""Represents a relationship in Discord.
|
||||
@@ -32,6 +33,8 @@ class Relationship:
|
||||
A relationship is like a friendship, a person who is blocked, etc.
|
||||
Only non-bot accounts can have relationships.
|
||||
|
||||
.. deprecated:: 1.7
|
||||
|
||||
Attributes
|
||||
-----------
|
||||
user: :class:`User`
|
||||
@@ -50,11 +53,14 @@ class Relationship:
|
||||
def __repr__(self):
|
||||
return '<Relationship user={0.user!r} type={0.type!r}>'.format(self)
|
||||
|
||||
@utils.deprecated()
|
||||
async def delete(self):
|
||||
"""|coro|
|
||||
|
||||
Deletes the relationship.
|
||||
|
||||
.. deprecated:: 1.7
|
||||
|
||||
Raises
|
||||
------
|
||||
HTTPException
|
||||
@@ -63,12 +69,15 @@ class Relationship:
|
||||
|
||||
await self._state.http.remove_relationship(self.user.id)
|
||||
|
||||
@utils.deprecated()
|
||||
async def accept(self):
|
||||
"""|coro|
|
||||
|
||||
Accepts the relationship request. e.g. accepting a
|
||||
friend request.
|
||||
|
||||
.. deprecated:: 1.7
|
||||
|
||||
Raises
|
||||
-------
|
||||
HTTPException
|
||||
|
||||
Reference in New Issue
Block a user