Skip to content

Commit

Permalink
[Destiny] User display_avatar where applicable
Browse files Browse the repository at this point in the history
  • Loading branch information
TrustyJAID committed Dec 3, 2023
1 parent e3f0e8e commit 0687e0a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions destiny/destiny.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,14 +880,14 @@ async def make_character_embed(
bnet_display_name = chars["profile"]["data"]["userInfo"]["bungieGlobalDisplayName"]
bnet_code = chars["profile"]["data"]["userInfo"]["bungieGlobalDisplayNameCode"]
bnet_name = f"{bnet_display_name}#{bnet_code}"
embed.set_author(name=bnet_name, icon_url=user.avatar.url)
embed.set_author(name=bnet_name, icon_url=user.display_avatar)
# if "emblemPath" in char:
# embed.set_thumbnail(url=IMAGE_URL + char["emblemPath"])
if "emblemBackgroundPath" in char:
embed.set_image(url=IMAGE_URL + char["emblemBackgroundPath"])
if titles:
# embed.add_field(name=_("Titles"), value=titles)
embed.set_author(name=f"{bnet_name} ({title_name})", icon_url=user.avatar.url)
embed.set_author(name=f"{bnet_name} ({title_name})", icon_url=user.display_avatar)
# log.debug(data)
stats_str = ""
if chars["profileCommendations"]:
Expand Down Expand Up @@ -2312,12 +2312,14 @@ async def loadout_equipped(self, ctx: commands.Context, full: Optional[bool] = F
except KeyError:
pass
embed = discord.Embed(title=info)
embed.set_author(name=bnet_name, icon_url=user.avatar.url)
embed.set_author(name=bnet_name, icon_url=user.display_avatar)
if "emblemPath" in char:
embed.set_thumbnail(url=IMAGE_URL + char["emblemPath"])
if titles:
# embed.add_field(name=_("Titles"), value=titles)
embed.set_author(name=f"{bnet_name} ({title_name})", icon_url=user.avatar.url)
embed.set_author(
name=f"{bnet_name} ({title_name})", icon_url=user.display_avatar
)
char_items = chars["characterEquipment"]["data"][char_id]["items"]
item_list = [i["itemHash"] for i in char_items]
# log.debug(item_list)
Expand Down Expand Up @@ -2509,7 +2511,7 @@ async def history(
)
if activity_data.get("pgcrImage", None) is not None:
embed.set_image(url=IMAGE_URL + activity_data["pgcrImage"])
embed.set_author(name=char_info, icon_url=user.avatar.url)
embed.set_author(name=char_info, icon_url=user.display_avatar)
for attr, name in RAID.items():
if activities["values"][attr]["basic"]["value"] < 0:
continue
Expand Down Expand Up @@ -2655,7 +2657,7 @@ async def build_stat_embed_char_basic(
if raid_names:
description = "\n".join(n for n in raid_names)
embed.description = _("__**Raids Completed:**__\n") + description
embed.set_author(name=f"{user.display_name} - {char_info}", icon_url=user.avatar.url)
embed.set_author(name=f"{user.display_name} - {char_info}", icon_url=user.display_avatar)
kills = data[stat_type]["allTime"]["kills"]["basic"]["displayValue"]
deaths = data[stat_type]["allTime"]["deaths"]["basic"]["displayValue"]
assists = data[stat_type]["allTime"]["assists"]["basic"]["displayValue"]
Expand Down Expand Up @@ -2714,7 +2716,7 @@ async def build_stat_embed_char_gambit(
"winLossRatio": _("Win Loss Ratio"),
}
embed = discord.Embed(title=_("Gambit") + f" - {char_info}")
embed.set_author(name=f"{user.display_name} - {char_info}", icon_url=user.avatar.url)
embed.set_author(name=f"{user.display_name} - {char_info}", icon_url=user.display_avatar)
kills = data["kills"]["basic"]["displayValue"]
deaths = data["deaths"]["basic"]["displayValue"]
assists = data["assists"]["basic"]["displayValue"]
Expand Down

0 comments on commit 0687e0a

Please sign in to comment.