From 0b663fb96fa5b41638eb243443f61ab32f8d61a5 Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Sat, 30 Dec 2023 18:18:36 +0700 Subject: [PATCH] make roll query matcher less strict --- src/commands/roll.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/roll.ts b/src/commands/roll.ts index ffd0add..89a7d70 100644 --- a/src/commands/roll.ts +++ b/src/commands/roll.ts @@ -86,7 +86,7 @@ const getRoute = async ( export const roll = async (text: string) => { try { - const parts = text.match(/^\/roll\s?(\d+)?[-\s,]?(\d+)?$/); + const parts = text.match(/^\/roll\s?(\d+)?[-\s,]{0,3}(\d+)?$/); const result = await getRoute(parseVal(parts?.[1]), parseVal(parts?.[2])); if (!result || !result?.id) {