/*
* Vencord, a Discord client mod
* Copyright (c) 2024 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { findGroupChildrenByChildId, NavContextMenuPatchCallback } from "@api/ContextMenu";
import { DataStore } from "@api/index";
import { definePluginSettings } from "@api/Settings";
import ErrorBoundary from "@components/ErrorBoundary";
import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types";
import { Button, Menu } from "@webpack/common";
import React, { ReactNode } from "react";
const settings = definePluginSettings({
showGif: {
type: OptionType.BOOLEAN,
description: "Whether to show a snazzy cat gif",
default: true,
restartNeeded: true
},
showMessage: {
type: OptionType.BOOLEAN,
description: "Whether to show a message detailing which id was blocked",
default: false,
restartNeeded: true
},
showButton: {
type: OptionType.BOOLEAN,
description: "Whether to show a button to unblock the gif",
default: true,
restartNeeded: true
},
blockedStickers: {
type: OptionType.STRING,
description: "The list of blocked sticker IDs (don't edit unless you know what you're doing)",
default: ""
}
});
function blockedComponentRender(sticker) {
const { showGif, showMessage, showButton } = settings.store;
const elements = [] as ReactNode[];
if (showGif) {
elements.push(
);
}
if (showMessage) {
elements.push(