aboutsummaryrefslogtreecommitdiff
path: root/discord/http.py
diff options
context:
space:
mode:
authorNCPlayz <[email protected]>2019-10-08 20:45:44 +0100
committerRapptz <[email protected]>2019-11-15 04:23:15 -0500
commitdab2519a09bb64d335a80423fb1d522e46a1ee5c (patch)
tree4b60027d4b57f4824c8d23b940cc55d5e7436788 /discord/http.py
parent[docs] add new FAQ entries (diff)
downloaddiscord.py-dab2519a09bb64d335a80423fb1d522e46a1ee5c.tar.xz
discord.py-dab2519a09bb64d335a80423fb1d522e46a1ee5c.zip
Implement `TextChannel.follow()`
Diffstat (limited to 'discord/http.py')
-rw-r--r--discord/http.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/discord/http.py b/discord/http.py
index 70a04bda..ed06996c 100644
--- a/discord/http.py
+++ b/discord/http.py
@@ -564,6 +564,12 @@ class HTTPClient:
def get_webhook(self, webhook_id):
return self.request(Route('GET', '/webhooks/{webhook_id}', webhook_id=webhook_id))
+ def follow_webhook(self, channel_id, webhook_channel_id):
+ payload = {
+ 'webhook_channel_id': str(webhook_channel_id)
+ }
+ return self.request(Route('POST', '/channels/{channel_id}/followers', channel_id=channel_id), json=payload)
+
# Guild management
def get_guilds(self, limit, before=None, after=None):