diff --git a/src/components/PluginSettings/components/SettingArrayComponent.tsx b/src/components/PluginSettings/components/SettingArrayComponent.tsx
index 44b35a005..5ccd2902c 100644
--- a/src/components/PluginSettings/components/SettingArrayComponent.tsx
+++ b/src/components/PluginSettings/components/SettingArrayComponent.tsx
@@ -40,20 +40,20 @@ const GroupDMAvatars = findComponentByCodeLazy(".AvatarSizeSpecs[", "getAvatarUR
const CloseIcon = () => {
return ;
};
const CheckMarkIcon = () => {
return ;
};
const SearchIcon = () => {
return ;
@@ -72,15 +72,13 @@ export function SettingArrayComponent({
const [text, setText] = useState("");
useEffect(() => {
- if (text === "") {
- setError(null);
- } else if (!isNaN(Number(text))) {
+ if (!isNaN(Number(text)) && text !== "") {
if (text.length >= 18 && text.length <= 19) {
setError(null);
} else {
setError("Invalid ID");
}
- } else {
+ } else if (text !== "") {
setError(null);
}
}, [text]);
@@ -175,32 +173,32 @@ export function SettingArrayComponent({
switch (type) {
case 2:
return ;
case 5:
return ;
case 13:
return ;
case 15:
return ;
default: // Text channel icon
return ;
}
};
@@ -349,18 +347,18 @@ export function SettingArrayComponent({
>
setText(v)}
value={text}
/>
- {!isNaN(Number(text)) && text !== "" ?
+ {option.type === OptionType.ARRAY || (!isNaN(Number(text)) && text !== "") ?
:
diff --git a/src/plugins/_api/settingArrays.tsx b/src/plugins/_api/settingArrays.tsx
index 8083a71a7..956385afa 100644
--- a/src/plugins/_api/settingArrays.tsx
+++ b/src/plugins/_api/settingArrays.tsx
@@ -72,6 +72,8 @@ function renderRegisteredPlugins(name: string, value: any) {
function MakeContextCallback(name: "Guild" | "User" | "Channel"): NavContextMenuPatchCallback {
return (children, props) => {
+ if (!registeredPlugins[OptionType.CHANNELS] && !registeredPlugins[OptionType.USERS] && !registeredPlugins[OptionType.GUILDS])
+ return;
const value = props[name.toLowerCase()];
if (!value) return;
if (props.label === getIntlMessage("CHANNEL_ACTIONS_MENU_LABEL")) return; // random shit like notification settings