From 00988894995f7ac5e8ddc34125704a230329137c Mon Sep 17 00:00:00 2001 From: Vitor Date: Tue, 23 Aug 2022 23:22:44 +0100 Subject: [PATCH] feat(FormattingPatterns): add `ApplicationCommand` (#525) Co-authored-by: Almeida Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com> --- deno/globals.ts | 7 +++++++ globals.ts | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/deno/globals.ts b/deno/globals.ts index c7fc269ad..a2154ace3 100644 --- a/deno/globals.ts +++ b/deno/globals.ts @@ -45,6 +45,13 @@ export const FormattingPatterns = { * The `id` group property is present on the `exec` result of this expression */ Role: /<@&(?\d{17,20})>/, + /** + * Regular expression for matching a application command mention + * + * 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})>/, /** * Regular expression for matching a custom emoji, either static or animated * diff --git a/globals.ts b/globals.ts index c7fc269ad..a2154ace3 100644 --- a/globals.ts +++ b/globals.ts @@ -45,6 +45,13 @@ export const FormattingPatterns = { * The `id` group property is present on the `exec` result of this expression */ Role: /<@&(?\d{17,20})>/, + /** + * Regular expression for matching a application command mention + * + * 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})>/, /** * Regular expression for matching a custom emoji, either static or animated *