From 60bc823eab8876a63f8b3d192a703c99ace8921a Mon Sep 17 00:00:00 2001 From: Sam <149597648+cheesesamwich@users.noreply.github.com> Date: Tue, 16 Jan 2024 03:00:41 +0000 Subject: [PATCH] new plugin: BetterGifPicker (#2108) Co-authored-by: V --- src/plugins/betterGifPicker/index.ts | 23 +++++++++++++++++++++++ src/utils/constants.ts | 4 ++++ 2 files changed, 27 insertions(+) create mode 100644 src/plugins/betterGifPicker/index.ts diff --git a/src/plugins/betterGifPicker/index.ts b/src/plugins/betterGifPicker/index.ts new file mode 100644 index 00000000..09bb570d --- /dev/null +++ b/src/plugins/betterGifPicker/index.ts @@ -0,0 +1,23 @@ +/* + * Vencord, a Discord client mod + * Copyright (c) 2024 Vendicated and contributors + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +import { Devs } from "@utils/constants"; +import definePlugin from "@utils/types"; + +export default definePlugin({ + name: "BetterGifPicker", + description: "Makes the gif picker open the favourite category by default", + authors: [Devs.Samwich], + patches: [ + { + find: ".GIFPickerResultTypes.SEARCH", + replacement: [{ + match: "this.state={resultType:null}", + replace: 'this.state={resultType:"Favorites"}' + }] + } + ] +}); diff --git a/src/utils/constants.ts b/src/utils/constants.ts index a94ba0fc..699c40b9 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -403,6 +403,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({ name: "Grzesiek11", id: 368475654662127616n, }, + Samwich: { + name: "Samwich", + id: 976176454511509554n, + }, } satisfies Record); // iife so #__PURE__ works correctly