From 41e35c4381d9b93b8f2a38b10a85b806c5aef09f Mon Sep 17 00:00:00 2001 From: Andrei Date: Sat, 17 Jun 2017 16:23:44 -0700 Subject: [PATCH] Add support for limit/after query args in guild_members_list (fixes #37) --- disco/api/client.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/disco/api/client.py b/disco/api/client.py index abc261f..2f2533e 100644 --- a/disco/api/client.py +++ b/disco/api/client.py @@ -263,8 +263,11 @@ class APIClient(LoggingClass): 'position': position, }) - def guilds_members_list(self, guild): - r = self.http(Routes.GUILDS_MEMBERS_LIST, dict(guild=guild)) + def guilds_members_list(self, guild, limit=1000, after=None): + r = self.http(Routes.GUILDS_MEMBERS_LIST, dict(guild=guild), params=optional( + limit=limit, + after=after, + )) return GuildMember.create_hash(self.client, 'id', r.json(), guild_id=guild) def guilds_members_get(self, guild, member):