refactor(channels): share reset-command normalization utility

This commit is contained in:
William Valentin
2026-02-15 22:22:40 -08:00
parent 05d8abc79d
commit 8b529a18f2
7 changed files with 59 additions and 11 deletions
+11
View File
@@ -31,3 +31,14 @@ export function splitMessage(text: string, maxLength: number): string[] {
return chunks;
}
/**
* Normalize reset command variants to a canonical text form.
* Returns '!reset' for recognized variants, otherwise returns the original text.
*/
export function normalizeResetCommandText(text: string): string {
if (text === '!reset' || text === 'reset') {
return '!reset';
}
return text;
}