feat(decoration): add params to toggle animated decoration

This commit is contained in:
Hexagonn
2024-09-28 15:54:10 +07:00
parent e4842100f1
commit 7343d17238

View File

@@ -11,6 +11,7 @@ type Parameters = {
bg?: string;
clanbg?: string;
animated?: string;
animatedDecoration?: string;
hideDiscrim?: string;
hideStatus?: string;
hideTimestamp?: string;
@@ -121,7 +122,7 @@ const renderCard = async (body: LanyardTypes.Root, params: Parameters): Promise<
let avatarDecoration: string;
if (data.discord_user.avatar_decoration_data) {
avatarDecoration = await encodeBase64(
`https://cdn.discordapp.com/avatar-decoration-presets/${data.discord_user.avatar_decoration_data.asset}.png?size=64&passthrough=true`
`https://cdn.discordapp.com/avatar-decoration-presets/${data.discord_user.avatar_decoration_data.asset}.png?size=64&passthrough=${params.animatedDecoration || "true"}`
);
}