refactor(channels): share reset-command normalization utility
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user