mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-24 22:17: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["hoist-role"] = None
|
||||||
member["color"] = None
|
member["color"] = None
|
||||||
if apimem:
|
if apimem:
|
||||||
for roleid in reversed(apimem["roles"]):
|
mem_roles = []
|
||||||
|
for roleid in apimem["roles"]:
|
||||||
role = guildroles_filtered.get(roleid)
|
role = guildroles_filtered.get(roleid)
|
||||||
if not role:
|
if not role:
|
||||||
continue
|
continue
|
||||||
|
mem_roles.append(role)
|
||||||
|
mem_roles = sorted(mem_roles, key=lambda k: k['position'])
|
||||||
|
for role in mem_roles:
|
||||||
if role["color"] != 0:
|
if role["color"] != 0:
|
||||||
member["color"] = '{0:02x}'.format(role["color"]) #int to hex
|
member["color"] = '{0:02x}'.format(role["color"]) #int to hex
|
||||||
if role["hoist"]:
|
if role["hoist"]:
|
||||||
|
Loading…
Reference in New Issue
Block a user