From f62f2506b04e1d798fa7d8f58f63cfa52622ee81 Mon Sep 17 00:00:00 2001 From: Almeida Date: Thu, 6 Oct 2022 13:18:06 +0100 Subject: [PATCH] refactor(FormattingPatterns): update `SlashCommand` pattern (#597) --- deno/globals.ts | 2 +- globals.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deno/globals.ts b/deno/globals.ts index a2154ace..8169a36c 100644 --- a/deno/globals.ts +++ b/deno/globals.ts @@ -51,7 +51,7 @@ export const FormattingPatterns = { * The `fullName` (possibly including `name`, `subcommandOrGroup` and `subcommand`) and `id` group properties are present on the `exec` result of this expression */ SlashCommand: - /<\/(?(?[\w-]{1,32})(?: (?[\w-]{1,32}))?(?: (?[\w-]{1,32}))?):(?\d{17,20})>/, + /<\/(?(?[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32})(?: (?[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32}))?(?: (?[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32}))?):(?\d{17,20})>/u, /** * Regular expression for matching a custom emoji, either static or animated * diff --git a/globals.ts b/globals.ts index a2154ace..8169a36c 100644 --- a/globals.ts +++ b/globals.ts @@ -51,7 +51,7 @@ export const FormattingPatterns = { * The `fullName` (possibly including `name`, `subcommandOrGroup` and `subcommand`) and `id` group properties are present on the `exec` result of this expression */ SlashCommand: - /<\/(?(?[\w-]{1,32})(?: (?[\w-]{1,32}))?(?: (?[\w-]{1,32}))?):(?\d{17,20})>/, + /<\/(?(?[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32})(?: (?[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32}))?(?: (?[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32}))?):(?\d{17,20})>/u, /** * Regular expression for matching a custom emoji, either static or animated *