diff options
| author | Rapptz <[email protected]> | 2017-04-30 07:16:11 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-04-30 07:17:00 -0400 |
| commit | ba2dad209316aeaecb9e1d315bb03a09794c5e2c (patch) | |
| tree | 548dceed0b68850a6de8e2781146ebe110b029d8 /discord/http.py | |
| parent | Changed audit_log to audit_logs in documentation (diff) | |
| download | discord.py-ba2dad209316aeaecb9e1d315bb03a09794c5e2c.tar.xz discord.py-ba2dad209316aeaecb9e1d315bb03a09794c5e2c.zip | |
Add support for setting and retrieving guild vanity invites.
Diffstat (limited to 'discord/http.py')
| -rw-r--r-- | discord/http.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/discord/http.py b/discord/http.py index eab37c62..12252eb8 100644 --- a/discord/http.py +++ b/discord/http.py @@ -531,6 +531,13 @@ class HTTPClient: def get_bans(self, guild_id): return self.request(Route('GET', '/guilds/{guild_id}/bans', guild_id=guild_id)) + def get_vanity_code(self, guild_id): + return self.request(Route('GET', '/guilds/{guild_id}/vanity-url', guild_id=guild_id)) + + def change_vanity_code(self, guild_id, code): + payload = { 'code': code } + return self.request(Route('PATCH', '/guilds/{guild_id}/vanity-url', guild_id=guild_id), json=payload) + def prune_members(self, guild_id, days): params = { 'days': days |