/*
* Vencord, a Discord client mod
* Copyright (c) 2024 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { Alerts, Button, ChannelStore } from "@webpack/common";
import { CLONE_LINK_REGEX, Native, plugins } from ".";
const WHITELISTED_SHARE_CHANNELS = ["1256395889354997771", "1032200195582197831", "1301947896601509900", "1322935137591365683"];
export default function UserpluginInstallButton({ props }: any) {
const { message } = props;
if (!WHITELISTED_SHARE_CHANNELS.includes(ChannelStore.getChannel(message.channel_id).parent_id) && !WHITELISTED_SHARE_CHANNELS.includes(message.channel_id))
return;
const gitLink = (props.message.content as string).match(CLONE_LINK_REGEX);
if (!gitLink) return;
const installed = plugins.includes(gitLink[3]);
return <>
{
installed &&
}
>;
}