aboutsummaryrefslogtreecommitdiff
path: root/src/arguments/messageLink.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-05-25 17:15:16 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-05-25 17:15:16 -0400
commit85623caadc009423a999949880de12a386f335c2 (patch)
treecc5a68dd8d209e55b472e71c63b2a9a58bdba197 /src/arguments/messageLink.ts
parent232634a3b30ba4b5ceabd3c594f5b345fde399e0 (diff)
downloadtanzanite-85623caadc009423a999949880de12a386f335c2.tar.gz
tanzanite-85623caadc009423a999949880de12a386f335c2.tar.bz2
tanzanite-85623caadc009423a999949880de12a386f335c2.zip
fix(messageLinkTypeCaster): clone frozen regex
Diffstat (limited to 'src/arguments/messageLink.ts')
-rw-r--r--src/arguments/messageLink.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arguments/messageLink.ts b/src/arguments/messageLink.ts
index 03e550d..5c91a4b 100644
--- a/src/arguments/messageLink.ts
+++ b/src/arguments/messageLink.ts
@@ -2,7 +2,7 @@ import { type BushArgumentTypeCaster } from '#lib';
import { type Message } from 'discord.js';
export const messageLink: BushArgumentTypeCaster<Promise<Message | null>> = async (_, phrase) => {
- const match = client.consts.regex.messageLink.exec(phrase);
+ const match = new RegExp(client.consts.regex.messageLink).exec(phrase);
if (!match || !match.groups) return null;
const { guild_id, channel_id, message_id } = match.groups;