mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-24 14:07:03 +01:00
Fixes #30, member list hoisting, hopefully.
This commit is contained in:
parent
0ece2b56e7
commit
26c0e7444f
@ -262,10 +262,14 @@ def get_online_discord_users(guild_id, embed):
|
||||
member["hoist-role"] = None
|
||||
member["color"] = None
|
||||
if apimem:
|
||||
for roleid in reversed(apimem["roles"]):
|
||||
mem_roles = []
|
||||
for roleid in apimem["roles"]:
|
||||
role = guildroles_filtered.get(roleid)
|
||||
if not role:
|
||||
continue
|
||||
mem_roles.append(role)
|
||||
mem_roles = sorted(mem_roles, key=lambda k: k['position'])
|
||||
for role in mem_roles:
|
||||
if role["color"] != 0:
|
||||
member["color"] = '{0:02x}'.format(role["color"]) #int to hex
|
||||
if role["hoist"]:
|
||||
|
Loading…
Reference in New Issue
Block a user