Plugin

AlwaysAnimate

Animates anything that can be animated

Appearance Fun
index.ts
Download

Source

src/plugins/alwaysAnimate/index.ts
1import { Devs } from "@utils/constants";
2import definePlugin from "@utils/types";
3
4export default definePlugin({
5 name: "AlwaysAnimate",
6 description: "Animates anything that can be animated",
7 tags: ["Appearance", "Fun"],
8 authors: [Devs.FieryFlames],
9
10 patches: [
11 {
12 find: "canAnimate:",
13 all: true,
14 // Some modules match the find but the replacement is returned untouched
15 noWarn: true,
16 replacement: {
17 match: /canAnimate:.+?([,}].*?\))/g,
18 replace: (m, rest) => {
19 const destructuringMatch = rest.match(/}=.+/);
20 if (destructuringMatch == null) return `canAnimate:!0${rest}`;
21 return m;
22 }
23 }
24 },
25 {
26 // Status emojis
27 find: "#{intl::GUILD_OWNER}),children:",
28 replacement: {
29 match: /(\.CUSTOM_STATUS.+?animateEmoji:)\i/,
30 replace: "$1!0"
31 }
32 },
33 {
34 // Guild Banner
35 find: "#{intl::DISCOVERABLE_GUILD_HEADER_PUBLIC_INFO}",
36 replacement: {
37 match: /(guildBanner:\i,animate:)\i(?=}\):null)/,
38 replace: "$1!0"
39 }
40 },
41 {
42 // Gradient roles in chat
43 find: "=!1,contentOnly:",
44 replacement: {
45 match: /animate:\i/,
46 replace: "animate:!0"
47 }
48 },
49 {
50 // Gradient roles in member list
51 find: '="left",className:',
52 replacement: {
53 match: /,animateGradient:/,
54 replace: ",animateGradient:!0,_oldAnimateGradient:"
55 }
56 },
57 {
58 // Nameplates
59 find: ".MINI_PREVIEW,[",
60 replacement: {
61 match: /animate:\i,loop:/,
62 replace: "animate:true,loop:true,_loop:"
63 }
64 }
65 ]
66});
67