From 62b8ebb4cf1f104bbebe9934bce5f8826fd69277 Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Fri, 27 Feb 2026 19:23:36 +0100 Subject: [PATCH] Use lookbehind to improve x command regex --- commands/misc/x.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/misc/x.js b/commands/misc/x.js index 1d35bd4..bf8e1c7 100644 --- a/commands/misc/x.js +++ b/commands/misc/x.js @@ -9,7 +9,7 @@ module.exports = { return; } let replacedLink = ""; - const regex = /(x|twitter)\.com/g + const regex = /(?<=\/)(x|twitter)\.com/g if(args[0].startsWith("https://") || args[0].startsWith("http://")){ replacedLink = args[0].replace(regex, "fxtwitter.com"); }