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