aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/fxTwitter.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/fxTwitter.ts b/src/plugins/fxTwitter.ts
index 0cf19be..53477d2 100644
--- a/src/plugins/fxTwitter.ts
+++ b/src/plugins/fxTwitter.ts
@@ -2,6 +2,8 @@ import definePlugin from "../utils/types";
import { addPreSendListener, MessageObject, removePreSendListener } from "../api/MessageEvents";
import { Devs } from "../utils/constants";
+const re = /https?:\/\/twitter\.com(?=\/\w+?\/status\/)/g;
+
export default definePlugin({
name: "FxTwitter",
description: "Uses FxTwitter to improve embeds from twitter on send",
@@ -9,7 +11,7 @@ export default definePlugin({
dependencies: ["MessageEventsAPI"],
addPrefix(msg: MessageObject) {
- msg.content = msg.content.replace(/https?:\/\/twitter\.com(?=\/.*?\/)/g, "https://fxtwitter.com");
+ msg.content = msg.content.replace(re, "https://fxtwitter.com");
},
start() {