mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-23 21:47:04 +01:00
hotfix if the membr has a role that does not exist somehow
This commit is contained in:
parent
33f881bff3
commit
e6624e0185
@ -259,7 +259,9 @@ def get_online_discord_users(guild_id, embed):
|
||||
member["color"] = None
|
||||
if apimem:
|
||||
for roleid in reversed(apimem["roles"]):
|
||||
role = guildroles_filtered[roleid]
|
||||
role = guildroles_filtered.get(roleid)
|
||||
if not role:
|
||||
continue
|
||||
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