2024-02-06 16:29:47 +01:00
|
|
|
/*
|
|
|
|
|
* 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: "ChatInputButtonAPI",
|
|
|
|
|
description: "API to add buttons to the chat input",
|
|
|
|
|
authors: [Devs.Ven],
|
|
|
|
|
|
2025-01-29 01:04:36 -03:00
|
|
|
patches: [
|
|
|
|
|
{
|
|
|
|
|
find: '"sticker")',
|
|
|
|
|
replacement: {
|
2026-01-28 18:43:02 -03:00
|
|
|
match: /0===(\i)\.length(?=.{0,25}?\(0,\i\.jsxs?\)\(.{0,75}?children:\1)/,
|
|
|
|
|
replace: "(Vencord.Api.ChatButtons._injectButtons($1,arguments[0]),$&)"
|
2025-01-29 01:04:36 -03:00
|
|
|
}
|
2024-02-06 16:29:47 +01:00
|
|
|
}
|
2025-01-29 01:04:36 -03:00
|
|
|
]
|
2024-02-06 16:29:47 +01:00
|
|
|
});
|