fix: fix '아어아어아어' repeat produce strange sound

This commit is contained in:
kimpure 2026-05-30 09:05:12 +00:00
parent f49d16f8e2
commit dae830ba6a
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View file

@ -26,7 +26,7 @@ export class DiscordBot {
public async registerCommands(): Promise<void> { public async registerCommands(): Promise<void> {
try { try {
if (!this.client.isReady()) { if (!this.client.isReady()) {
await this.client.once(Events.ClientReady, () => {}); this.client.once(Events.ClientReady, () => {});
} }
const commandsCachePath = join(cwd(), "cache", "commands"); const commandsCachePath = join(cwd(), "cache", "commands");

View file

@ -20,7 +20,9 @@ export function processUnsounds(input: string): string {
// Process korean letter, choseong shortens // Process korean letter, choseong shortens
export function processKorean(input: string): string { export function processKorean(input: string): string {
input = input.replace(/[아ㅏ]{3,}/g, "아아아"); input = input.replace(/[아ㅏ어ㅓ]{3,}/g, (content: string) =>
content.substring(0, 3),
);
return input.replace(/[ㄱ-ㅎㄲㄸㅃㅆㅉ]+/g, (i) => return input.replace(/[ㄱ-ㅎㄲㄸㅃㅆㅉ]+/g, (i) =>
i i