diff options
| author | Rapptz <[email protected]> | 2021-04-06 23:48:11 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-04-07 00:01:57 -0400 |
| commit | 1d5805ebcbd28d581683cfc3aed72836c3a8d395 (patch) | |
| tree | 247a90e5d08f2e9fc6b850bfb4b364365d08c591 | |
| parent | Fix AttributeError on HTTPClient.send_file to be send_files (diff) | |
| download | discord.py-1d5805ebcbd28d581683cfc3aed72836c3a8d395.tar.xz discord.py-1d5805ebcbd28d581683cfc3aed72836c3a8d395.zip | |
Revert "Remove unused group functionality"
This reverts commit d69b2f0af563993bdae425f4bb92fb555a238933.
| -rw-r--r-- | discord/http.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/discord/http.py b/discord/http.py index 7c36ee9d..353410e4 100644 --- a/discord/http.py +++ b/discord/http.py @@ -310,6 +310,18 @@ class HTTPClient: def logout(self): return self.request(Route('POST', '/auth/logout')) + # Group functionality + + def start_group(self, user_id, recipients): + payload = { + 'recipients': recipients, + } + + return self.request(Route('POST', '/users/{user_id}/channels', user_id=user_id), json=payload) + + def leave_group(self, channel_id): + return self.request(Route('DELETE', '/channels/{channel_id}', channel_id=channel_id)) + # Message management def start_private_message(self, user_id): |