Skip to content

Commit

Permalink
null check
Browse files Browse the repository at this point in the history
  • Loading branch information
Rico040 committed May 14, 2024
1 parent 5f9f1c8 commit 105217b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/picture-links/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const unpatchBanner = after("default", ProfileBanner, ([{ bannerSource }], res)
});

var unpatchGuildIcon = after("default", GuildIcon, ([{ size, guild }], res) => {
if (size !== "XLARGE") return;
if (size !== "XLARGE" || guild?.icon == null) return;
var ext = "png"
if (guild?.icon.includes('a_')) { ext = "gif"; }
const url = `https://cdn.discordapp.com/icons/${guild?.id}/${guild?.icon}.${ext}?size=4096`
Expand Down

0 comments on commit 105217b

Please sign in to comment.