Skip to content

Commit

Permalink
fuck
Browse files Browse the repository at this point in the history
  • Loading branch information
Rico040 committed May 21, 2024
1 parent 07e83ed commit 649a0a2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions plugins/picture-links/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,11 @@ async function openModal(src: string, event) {

const unpatchAvatar = after("default", HeaderAvatar, ([{ user, style, guildId }], res) => {
var ext = "png";
if (user.guildMemberAvatars[guildId].includes("a_")) {ext = "gif";}
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;

console.log("Guild Specific Avatar: ", guildSpecific);

const url =
typeof image === "number"
? `https://cdn.discordapp.com/embed/avatars/${Number(BigInt(user.id) >> 22n) % 6}.png`
Expand Down

0 comments on commit 649a0a2

Please sign in to comment.