From 896bc0ff02532dcad6c266d538b1d7d853d08db6 Mon Sep 17 00:00:00 2001 From: zodiaccong <52649950+zodiaccong@users.noreply.github.com> Date: Fri, 24 Feb 2023 03:58:44 +0700 Subject: [PATCH] Update user.py I add a api to get Roles user in a guild: '''python def getRoleUserInGuild(self, guildID): url = self.discord+'/users/@me/guilds/'+guildID+'/member' return Wrapper.sendRequest(self.s, 'get', url, log=self.log) --- discum/user/user.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/discum/user/user.py b/discum/user/user.py index 20c483a..51f5a9c 100644 --- a/discum/user/user.py +++ b/discum/user/user.py @@ -70,6 +70,10 @@ def getUserAffinities(self): def getGuildAffinities(self): url = self.discord+"users/@me/affinities/guilds" return Wrapper.sendRequest(self.s, 'get', url, log=self.log) + + def getRoleUserInGuild(self, guildID): + url = self.discord+'/users/@me/guilds/'+guildID+'/member' + return Wrapper.sendRequest(self.s, 'get', url, log=self.log) def getMentions(self, limit, roleMentions, everyoneMentions): roleMentions = str(roleMentions).lower()