aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2021-04-06 23:48:11 -0400
committerRapptz <[email protected]>2021-04-07 00:01:57 -0400
commit1d5805ebcbd28d581683cfc3aed72836c3a8d395 (patch)
tree247a90e5d08f2e9fc6b850bfb4b364365d08c591
parentFix AttributeError on HTTPClient.send_file to be send_files (diff)
downloaddiscord.py-1d5805ebcbd28d581683cfc3aed72836c3a8d395.tar.xz
discord.py-1d5805ebcbd28d581683cfc3aed72836c3a8d395.zip
Revert "Remove unused group functionality"
This reverts commit d69b2f0af563993bdae425f4bb92fb555a238933.
-rw-r--r--discord/http.py12
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):