mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-10 18:06:22 +00:00
DevCompanion: opinionated hacky changes
This commit is contained in:
parent
5851355248
commit
b6baaf81b1
2 changed files with 3 additions and 1 deletions
|
@ -212,6 +212,7 @@ export function initWs(isManual = false) {
|
||||||
let results: any[];
|
let results: any[];
|
||||||
switch (findType.replace("find", "").replace("Lazy", "")) {
|
switch (findType.replace("find", "").replace("Lazy", "")) {
|
||||||
case "":
|
case "":
|
||||||
|
case "Component":
|
||||||
results = findAll(parsedArgs[0]);
|
results = findAll(parsedArgs[0]);
|
||||||
break;
|
break;
|
||||||
case "ByProps":
|
case "ByProps":
|
||||||
|
@ -317,6 +318,7 @@ export function initWs(isManual = false) {
|
||||||
let results: any[];
|
let results: any[];
|
||||||
switch (type.replace("find", "").replace("Lazy", "")) {
|
switch (type.replace("find", "").replace("Lazy", "")) {
|
||||||
case "":
|
case "":
|
||||||
|
case "Component":
|
||||||
results = findAll(parsedArgs[0]);
|
results = findAll(parsedArgs[0]);
|
||||||
break;
|
break;
|
||||||
case "ByProps":
|
case "ByProps":
|
||||||
|
|
|
@ -95,7 +95,7 @@ export function findModuleId(find: CodeFilter) {
|
||||||
throw new Error("No Matches Found");
|
throw new Error("No Matches Found");
|
||||||
}
|
}
|
||||||
if (matches.length !== 1) {
|
if (matches.length !== 1) {
|
||||||
throw new Error("More than one match");
|
throw new Error(`This filter matches ${matches.length} modules. Make it more specific!`);
|
||||||
}
|
}
|
||||||
return matches[0];
|
return matches[0];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue