From 967b101af1a36437ea66d4aed575816a098c8009 Mon Sep 17 00:00:00 2001 From: botato <63275405+botatooo@users.noreply.github.com> Date: Fri, 30 Sep 2022 22:23:41 -0400 Subject: feat(plugin): iLoveSpam (#19) --- src/plugins/folderSvgIcon.ts | 17 ----------------- src/plugins/iLoveSpam.ts | 23 +++++++++++++++++++++++ src/plugins/plainFolderIcon.ts | 15 +++++++++++++++ src/utils/constants.ts | 4 ++++ 4 files changed, 42 insertions(+), 17 deletions(-) delete mode 100644 src/plugins/folderSvgIcon.ts create mode 100644 src/plugins/iLoveSpam.ts create mode 100644 src/plugins/plainFolderIcon.ts diff --git a/src/plugins/folderSvgIcon.ts b/src/plugins/folderSvgIcon.ts deleted file mode 100644 index 208efaa..0000000 --- a/src/plugins/folderSvgIcon.ts +++ /dev/null @@ -1,17 +0,0 @@ -import definePlugin from "../utils/types"; - -export default definePlugin({ - name: "Folder SVG Icon", - description: "Doesn't show the small guild icons in folders", - authors: [{ - name: "botato", - id: 440990343899643943n - }], - patches: [{ - find: "().expandedFolderIconWrapper", - replacement: [{ - match: /\(\w\|\|\w\)(&&\(\w=\w\.createElement\(\w+\.animated)/, - replace: "true$1", - }] - }] -}); diff --git a/src/plugins/iLoveSpam.ts b/src/plugins/iLoveSpam.ts new file mode 100644 index 0000000..d035372 --- /dev/null +++ b/src/plugins/iLoveSpam.ts @@ -0,0 +1,23 @@ +import { Devs } from "../utils/constants"; +import definePlugin from "../utils/types"; + +export default definePlugin({ + name: "iLoveSpam", + description: "Do not hide messages from 'likely spammers'", + authors: [ + Devs.botato, + { + name: "Iryis", + id: 118437263754395652n, + }, + ], + patches: [ + { + find: "),{hasFlag:", + replacement: { + match: /(if\((.{1,2})<=1<<30\)return)/, + replace: "if($2===(1<<20)){return false};$1", + }, + }, + ], +}); diff --git a/src/plugins/plainFolderIcon.ts b/src/plugins/plainFolderIcon.ts new file mode 100644 index 0000000..c04c78b --- /dev/null +++ b/src/plugins/plainFolderIcon.ts @@ -0,0 +1,15 @@ +import { Devs } from "../utils/constants"; +import definePlugin from "../utils/types"; + +export default definePlugin({ + name: "PlainFolderIcon", + description: "Doesn't show the small guild icons in folders", + authors: [Devs.botato], + patches: [{ + find: "().expandedFolderIconWrapper", + replacement: [{ + match: /\(\w\|\|\w\)(&&\(\w=\w\.createElement\(\w+\.animated)/, + replace: "true$1", + }] + }] +}); diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 57cd9b7..29ba6fa 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -18,5 +18,9 @@ export const Devs = Object.freeze({ Megu: { name: "Megumin", id: 545581357812678656n + }, + botato: { + name: "botato", + id: 440990343899643943n } }); -- cgit