diff --git a/src/plugins/fxTwitter.ts b/src/plugins/fxTwitter.ts index 0cf19be94..53477d299 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() {