commit 77ff6515f368fe92babe25cf703c2016d4acfd43 Author: nin0 Date: Thu Jul 11 10:17:35 2024 -0400 Add index.tsx diff --git a/index.tsx b/index.tsx new file mode 100644 index 0000000..8348d66 --- /dev/null +++ b/index.tsx @@ -0,0 +1,94 @@ +/* + * Vencord, a modification for Discord's desktop app + * Copyright (c) 2023 your mom lol + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ + +import definePlugin from "@utils/types"; +import { addButton, removeButton } from "@api/MessagePopover"; +import { ChannelStore } from "@webpack/common"; +import { PropsWithChildren } from "react"; + +import { classes } from "@utils/misc"; +import type { SVGProps } from "react"; + + +interface BaseIconProps extends IconProps { + viewBox: string; +} + +interface IconProps extends SVGProps { + className?: string; + height?: string | number; + width?: string | number; +} + +function Icon({ height = 24, width = 24, className, children, viewBox, ...svgProps }: PropsWithChildren) { + return ( + + {children} + + ); +} + + +export function Husk(props: IconProps) { + return ( + + + + ); +} + +export default definePlugin({ + name: "Husk", + description: "Adds husk button (works only on the Vencord Server if no nitro)", + authors: [{ + name: "nina", + id: 886685857560539176n + }], + dependencies: ["MessagePopoverAPI"], + + async start() { + addButton("Husk", msg => { + return { + label: "Husk", + icon: Husk, + message: msg, + channel: ChannelStore.getChannel(msg.channel_id), + onClick: () => Vencord.Webpack.findByProps("addReaction").addReaction(msg.channel_id, msg.id, {id: '1026532993923293184', name: 'husk', animated: false}) + }; + }); + }, + + stop() { + removeButton("Husk"); + }, + +}); \ No newline at end of file