Remove Client.accept_invite
This commit is contained in:
parent
98cfb53d3b
commit
aa41101237
@ -769,33 +769,6 @@ class Client:
|
||||
data = yield from self.http.get_invite(invite_id)
|
||||
return Invite.from_incomplete(state=self.connection, data=data)
|
||||
|
||||
@asyncio.coroutine
|
||||
def accept_invite(self, invite):
|
||||
"""|coro|
|
||||
|
||||
Accepts an :class:`Invite`, URL or ID to an invite.
|
||||
|
||||
The URL must be a discord.gg URL. e.g. "http://discord.gg/codehere".
|
||||
An ID for the invite is just the "codehere" portion of the invite URL.
|
||||
|
||||
Parameters
|
||||
-----------
|
||||
invite
|
||||
The :class:`Invite` or URL to an invite to accept.
|
||||
|
||||
Raises
|
||||
-------
|
||||
HTTPException
|
||||
Accepting the invite failed.
|
||||
NotFound
|
||||
The invite is invalid or expired.
|
||||
Forbidden
|
||||
You are a bot user and cannot use this endpoint.
|
||||
"""
|
||||
|
||||
invite_id = self._resolve_invite(invite)
|
||||
yield from self.http.accept_invite(invite_id)
|
||||
|
||||
@asyncio.coroutine
|
||||
def delete_invite(self, invite):
|
||||
"""|coro|
|
||||
|
@ -581,9 +581,6 @@ class HTTPClient:
|
||||
def invites_from_channel(self, channel_id):
|
||||
return self.request(Route('GET', '/channels/{channel_id}/invites', channel_id=channel_id))
|
||||
|
||||
def accept_invite(self, invite_id):
|
||||
return self.request(Route('POST', '/invite/{invite_id}', invite_id=invite_id))
|
||||
|
||||
def delete_invite(self, invite_id):
|
||||
return self.request(Route('DELETE', '/invite/{invite_id}', invite_id=invite_id))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user