aboutsummaryrefslogtreecommitdiff
path: root/discord/relationship.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2018-06-10 18:09:14 -0400
committerRapptz <[email protected]>2018-06-10 18:10:00 -0400
commitf25091efe1281aebe70189c61f9cac405b21a72f (patch)
treed0d13dad1a89de9f45845a36ea475098b7a0b494 /discord/relationship.py
parentAdd Message.jump_to_url (diff)
downloaddiscord.py-f25091efe1281aebe70189c61f9cac405b21a72f.tar.xz
discord.py-f25091efe1281aebe70189c61f9cac405b21a72f.zip
Drop support for Python 3.4 and make minimum version 3.5.2.
Diffstat (limited to 'discord/relationship.py')
-rw-r--r--discord/relationship.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/discord/relationship.py b/discord/relationship.py
index 575627e9..b301d420 100644
--- a/discord/relationship.py
+++ b/discord/relationship.py
@@ -52,8 +52,7 @@ class Relationship:
def __repr__(self):
return '<Relationship user={0.user!r} type={0.type!r}>'.format(self)
- @asyncio.coroutine
- def delete(self):
+ async def delete(self):
"""|coro|
Deletes the relationship.
@@ -64,10 +63,9 @@ class Relationship:
Deleting the relationship failed.
"""
- yield from self._state.http.remove_relationship(self.user.id)
+ await self._state.http.remove_relationship(self.user.id)
- @asyncio.coroutine
- def accept(self):
+ async def accept(self):
"""|coro|
Accepts the relationship request. e.g. accepting a
@@ -79,4 +77,4 @@ class Relationship:
Accepting the relationship failed.
"""
- yield from self._state.http.add_relationship(self.user.id)
+ await self._state.http.add_relationship(self.user.id)