Plugin

GifPaste

Makes picking a gif in the gif picker insert a link into the chatbox instead of instantly sending it

Media Chat
index.ts
Download

Source

src/plugins/gifPaste/index.ts
1/*
2 * FiveCord — a Discord client mod
3 * Copyright (c) 2025 FiveCord
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
7import { Devs } from "@utils/constants";
8import { insertTextIntoChatInputBox } from "@utils/discord";
9import definePlugin from "@utils/types";
10import { ExpressionPickerStore } from "@webpack/common";
11
12export default definePlugin({
13 name: "GifPaste",
14 description: "Makes picking a gif in the gif picker insert a link into the chatbox instead of instantly sending it",
15 tags: ["Media", "Chat"],
16 authors: [Devs.Ven],
17
18 patches: [{
19 find: "handleSelectGIF=",
20 replacement: {
21 match: /handleSelectGIF=(\i)=>\{/,
22 replace: "$&if (!this?.props?.className) return $self.handleSelect($1);"
23 }
24 }],
25
26 handleSelect(gif?: { url: string; }) {
27 if (gif) {
28 insertTextIntoChatInputBox(gif.url + " ");
29 ExpressionPickerStore.closeExpressionPicker();
30 }
31 }
32});
33