fix: fix '아어아어아어' repeat produce strange sound
This commit is contained in:
parent
f49d16f8e2
commit
dae830ba6a
2 changed files with 4 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ export class DiscordBot {
|
|||
public async registerCommands(): Promise<void> {
|
||||
try {
|
||||
if (!this.client.isReady()) {
|
||||
await this.client.once(Events.ClientReady, () => {});
|
||||
this.client.once(Events.ClientReady, () => {});
|
||||
}
|
||||
|
||||
const commandsCachePath = join(cwd(), "cache", "commands");
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@ export function processUnsounds(input: string): string {
|
|||
|
||||
// Process korean letter, choseong shortens
|
||||
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) =>
|
||||
i
|
||||
|
|
|
|||
Loading…
Reference in a new issue