Fix build errors

This commit is contained in:
Vignesh Natarajan committed 2026-01-28 01:25:07 -08:00
1 parent f3f1640c7b
commit 62e80d030c
4 files changed
+62 -29

No files matched your search

+4
View File
@@ -84,10 +84,14 @@ export async function resolveDiscordTarget(
const likelyUsername = isLikelyUsername(trimmed);
const shouldLookup = isExplicitUserLookup(trimmed, parseOptions) || likelyUsername;
// Parse directly if it's already a known format. Use a safe parse so ambiguous
// numeric targets don't throw when we still want to attempt username lookup.
const directParse = safeParseDiscordTarget(trimmed, parseOptions);
if (directParse && directParse.kind !== "channel" && !likelyUsername) {
return directParse;
}
if (!shouldLookup) {
return directParse ?? parseDiscordTarget(trimmed, parseOptions);
}