mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-14 18:11:23 +01:00
Bugfix usercard animations not showing
This commit is contained in:
parent
bd7e1419d7
commit
11b6e447ae
@ -140,7 +140,7 @@ def get_online_embed_users(guild_id):
|
||||
'username': usrdb.username,
|
||||
'nickname': usrdb.nickname,
|
||||
'discriminator': usrdb.discriminator,
|
||||
'avatar_url': generate_avatar_url(usrdb.user_id, usrdb.avatar, "0000", True),
|
||||
'avatar_url': generate_avatar_url(usrdb.user_id, usrdb.avatar),
|
||||
}
|
||||
users['authenticated'].append(meta)
|
||||
return users
|
||||
@ -469,7 +469,7 @@ def user_info(guild_id, user_id):
|
||||
usr["nickname"] = member.nickname
|
||||
usr["discriminator"] = member.discriminator
|
||||
usr["avatar"] = member.avatar
|
||||
usr["avatar_url"] = generate_avatar_url(usr["id"], usr["avatar"], usr["discriminator"])
|
||||
usr["avatar_url"] = generate_avatar_url(usr["id"], usr["avatar"], usr["discriminator"], True)
|
||||
roles = get_member_roles(guild_id, user_id)
|
||||
dbguild = db.session.query(Guilds).filter(Guilds.guild_id == guild_id).first()
|
||||
guild_roles = json.loads(dbguild.roles)
|
||||
|
@ -97,6 +97,8 @@ def check_user_permission(guild_id, id):
|
||||
|
||||
def generate_avatar_url(id, av, discrim="0000", allow_animate=False):
|
||||
if av:
|
||||
print(allow_animate)
|
||||
print(str(av).startswith("a_"))
|
||||
if allow_animate and str(av).startswith("a_"):
|
||||
return avatar_base_url + str(id) + '/' + str(av) + '.gif'
|
||||
return avatar_base_url + str(id) + '/' + str(av) + '.png'
|
||||
|
Loading…
Reference in New Issue
Block a user