refactor: dedupe plugin lowercase helpers

This commit is contained in:
Peter Steinberger
2026-04-07 11:43:49 +01:00
parent 37a7baf270
commit e2b5bdd500
6 changed files with 18 additions and 11 deletions

View File

@@ -26,7 +26,7 @@ export type CommandRegistrationResult = {
};
export function validateCommandName(name: string): string | null {
const trimmed = name.trim().toLowerCase();
const trimmed = normalizeOptionalLowercaseString(name) ?? "";
if (!trimmed) {
return "Command name cannot be empty";