From 4fa16ce3b46c8dabf744978f4a426bd45a4ab019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Purple=5F=CE=9Eye=E2=84=A2?= <168314373+Purple-EyeZ@users.noreply.github.com> Date: Sun, 18 May 2025 03:34:35 +0200 Subject: [PATCH] feat(alwaysAnimate): animate role gradients (#265) --- src/plugins/alwaysAnimate/index.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/plugins/alwaysAnimate/index.ts b/src/plugins/alwaysAnimate/index.ts index 4064de9f..e7d94d55 100644 --- a/src/plugins/alwaysAnimate/index.ts +++ b/src/plugins/alwaysAnimate/index.ts @@ -54,6 +54,20 @@ export default definePlugin({ match: /(\.headerContent.+?guildBanner:\i,animate:)\i/, replace: "$1!0" } + }, + { + // Role Gradients + find: "animateGradient:", + all: true, + noWarn: true, + replacement: { + match: /animateGradient:.+?([,}].*?\))/g, + replace: (m, rest) => { + const destructuringMatch = rest.match(/}=.+/); + if (destructuringMatch == null) return `animateGradient:!0${rest}`; + return m; + } + } } ] });