7 lines
219 B
TypeScript
7 lines
219 B
TypeScript
export function normalizeDiscordToken(raw?: string | null): string | undefined {
|
|
if (!raw) return undefined;
|
|
const trimmed = raw.trim();
|
|
if (!trimmed) return undefined;
|
|
return trimmed.replace(/^Bot\s+/i, "");
|
|
}
|