chore: update the regex for command names/option names (#7733)

This commit is contained in:
Vlad Frangu
2022-04-12 18:16:08 +03:00
committed by GitHub
parent 78a3afcd7f
commit 3582fe917d
2 changed files with 2 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ import type { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder
const namePredicate = s.string
.lengthGe(1)
.lengthLe(32)
.regex(/^[\P{Lu}\p{N}_-]+$/u);
.regex(/^[\P{Lu}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+$/u);
export function validateName(name: unknown): asserts name is string {
namePredicate.parse(name);