Plugin
GifPaste
Makes picking a gif in the gif picker insert a link into the chatbox instead of instantly sending it
1
import { Devs } from "@utils/constants";2
import { insertTextIntoChatInputBox } from "@utils/discord";3
import definePlugin from "@utils/types";4
import { ExpressionPickerStore } from "@webpack/common";5
6
export default definePlugin({7
name: "GifPaste",8
description: "Makes picking a gif in the gif picker insert a link into the chatbox instead of instantly sending it",9
tags: ["Media", "Chat"],10
authors: [Devs.Ven],11
12
patches: [{13
find: "handleSelectGIF=",14
replacement: {15
match: /handleSelectGIF=(\i)=>\{/,16
replace: "$&if (!this?.props?.className) return $self.handleSelect($1);"17
}18
}],19
20
handleSelect(gif?: { url: string; }) {21
if (gif) {22
insertTextIntoChatInputBox(gif.url + " ");23
ExpressionPickerStore.closeExpressionPicker();24
}25
}26
});27