fix: add opposites CORRECTLY.

This commit is contained in:
dvelo 2025-04-29 19:03:31 -05:00
parent b62f79e010
commit 7d0bb44568
2 changed files with 5 additions and 3 deletions

@ -89,7 +89,7 @@ export const serverModDB: ModDBCategory[] = [
name: "Always Online",
description: "All servers that are always online.",
color: "#a380e0",
value: new TagFilter(2),
value: new TagFilter(2, false),
icon: ServerCog
}
]

@ -81,8 +81,10 @@ export class TagFilter implements Filter {
));
if (typeof result === "boolean")
return new Promise((r) => r(!result))
return new Promise((r) => r(this.opposite ? !result : result))
return result;
return new Promise((r) => {
result.then((c) => r(this.opposite ? !c : c))
});
}
}