mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-11-03 23:37:09 +01:00 
			
		
		
		
	hotfix if the membr has a role that does not exist somehow
This commit is contained in:
		@@ -259,7 +259,9 @@ def get_online_discord_users(guild_id, embed):
 | 
				
			|||||||
        member["color"] = None
 | 
					        member["color"] = None
 | 
				
			||||||
        if apimem:
 | 
					        if apimem:
 | 
				
			||||||
            for roleid in reversed(apimem["roles"]):
 | 
					            for roleid in reversed(apimem["roles"]):
 | 
				
			||||||
                role = guildroles_filtered[roleid]
 | 
					                role = guildroles_filtered.get(roleid)
 | 
				
			||||||
 | 
					                if not role:
 | 
				
			||||||
 | 
					                    continue
 | 
				
			||||||
                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"]:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user