Update gateway/guild/parse.py
fixed so that value is a dictionary instead of a list
@@ -39,7 +39,7 @@ class GuildParse(object):
#take care of position
guilddata["my_data"] = response["d"].get("members", [])
guilddata["members"] = {} #we dont actually get sent the member list from guild creates. however, this usually contains our position/role in that guild so...still good info
- guilddata["my_data"] = [a for a in guilddata["my_data"] if a["user"]["id"]==my_user_id]
+ guilddata["my_data"] = next((a for a in guilddata["my_data"] if a["user"]["id"]==my_user_id), {})
if len(guilddata["my_data"]) == 1:
guilddata["my_data"][0].pop("user", None)
guilddata["my_data"][0]["user_id"] = my_user_id
