diff --git a/src/plugins/webhookManager.desktop/index.tsx b/src/plugins/webhookManager.desktop/index.tsx index 82e70da16..17b7e1bf7 100644 --- a/src/plugins/webhookManager.desktop/index.tsx +++ b/src/plugins/webhookManager.desktop/index.tsx @@ -8,35 +8,31 @@ import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption, import { Devs } from "@utils/constants"; import { Margins } from "@utils/margins"; import { ModalContent, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal"; -import { Button, Forms, React, Switch, TextInput, useState } from "@webpack/common"; +import { Button, Forms, React, Switch, TextInput } from "@webpack/common"; import definePlugin, { PluginNative } from "@utils/types"; const Native = VencordNative.pluginHelpers.WebhookManager as PluginNative; let url, message, username, avatarUrl = ""; let jsonMode = false; -const [params, setParams] = useState({ content: "", username: "", avatarUrl: "", url: "" }); - -const onURL = (content: string) => setParams(prev => ({ ...prev, url })); -const onContent = (content: string) => setParams(prev => ({ ...prev, content })); -const onUsername = (username: string) => setParams(prev => ({ ...prev, username })); -const onAvatar = (avatarUrl: string) => setParams(prev => ({ ...prev, avatarUrl })); - // TODO: fix webhooks not sending, fix probable undefined when null issue, add sending as raw again (wanted to make it a checkbox but i cant find checkbox) function WebhookMessageModal(props: ModalProps) { return Webhook URL { + v = url; + console.log(url); // why the FUCK is it undefined. + }} /> Webhook Message { + v = message; + }} /> Send as Raw JSON Webhook Username { + v = username; + }} /> Webhook Avatar URL { + v = avatarUrl; + }} />