diff --git a/src/guild.nim b/src/guild.nim index bcf188e..02ec480 100644 --- a/src/guild.nim +++ b/src/guild.nim @@ -854,4 +854,10 @@ proc createEmoji*(guild: Guild, name: string, image: Image, roles: seq[snowflake return newEmoji(sendRequest(endpoint(fmt("/guilds/{guild.id}/emojis")), HttpPost, defaultHeaders(newHttpHeaders({"Content-Type": "application/json"})), - guild.id, RateLimitBucketType.guild, jsonBody), guild.id) \ No newline at end of file + guild.id, RateLimitBucketType.guild, jsonBody), guild.id) + +proc getGuildMemberRoles*(guild: Guild, member: GuildMember): seq[Role] = + ## Get the role objects for a member's roles. + for role in guild.roles: + if (member.roles.contains(role.id)): + result.add(role) \ No newline at end of file