Plugin
GifPaste
Makes picking a gif in the gif picker insert a link into the chatbox instead of instantly sending it
1
/*2
* FiveCord — a Discord client mod3
* Copyright (c) 2025 FiveCord4
* SPDX-License-Identifier: GPL-3.0-or-later5
*/6
7
import { Devs } from "@utils/constants";8
import { insertTextIntoChatInputBox } from "@utils/discord";9
import definePlugin from "@utils/types";10
import { ExpressionPickerStore } from "@webpack/common";11
12
export 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