mirror of
https://github.com/NohamR/lanyard-profile-readme.git
synced 2026-05-26 20:00:43 +00:00
feat(decoration): add params to toggle animated decoration
This commit is contained in:
@@ -11,6 +11,7 @@ type Parameters = {
|
|||||||
bg?: string;
|
bg?: string;
|
||||||
clanbg?: string;
|
clanbg?: string;
|
||||||
animated?: string;
|
animated?: string;
|
||||||
|
animatedDecoration?: string;
|
||||||
hideDiscrim?: string;
|
hideDiscrim?: string;
|
||||||
hideStatus?: string;
|
hideStatus?: string;
|
||||||
hideTimestamp?: string;
|
hideTimestamp?: string;
|
||||||
@@ -121,7 +122,7 @@ const renderCard = async (body: LanyardTypes.Root, params: Parameters): Promise<
|
|||||||
let avatarDecoration: string;
|
let avatarDecoration: string;
|
||||||
if (data.discord_user.avatar_decoration_data) {
|
if (data.discord_user.avatar_decoration_data) {
|
||||||
avatarDecoration = await encodeBase64(
|
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"}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user