Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
Rico040 committed May 21, 2024
1 parent b66a335 commit ce0460d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/picture-links/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ async function openModal(src: string, event) {
}

const unpatchAvatar = after("default", HeaderAvatar, ([{ user, style, guildId }], res) => {
const guildSpecific = user.guildMemberAvatars?.[guildId] && `https://cdn.discordapp.com/guilds/${guildId}/users/${user.id}/avatars/${user.guildMemberAvatars[guildId]}.png?size=4096`;
var ext = "png";
if (typeof user.guildMemberAvatars?.[guildId] === "string") {
if (user.guildMemberAvatars?.[guildId].includes("a_")) { ext = "gif"; }
}
const guildSpecific = user.guildMemberAvatars?.[guildId] && `https://cdn.discordapp.com/guilds/${guildId}/users/${user.id}/avatars/${user.guildMemberAvatars[guildId]}.${ext}?size=4096`;
const image = user?.getAvatarURL?.(false, 4096, true);
if (!image) return res;

Expand Down

0 comments on commit ce0460d

Please sign in to comment.