From 5e1b42120c647afb0fbd531d7fa795ef606742db Mon Sep 17 00:00:00 2001 From: Vendicated Date: Wed, 2 Nov 2022 20:13:55 +0100 Subject: [PATCH] Fix plugins on new update --- src/plugins/apiMessageEvents.ts | 2 +- src/plugins/betterGifAltText.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/apiMessageEvents.ts b/src/plugins/apiMessageEvents.ts index 5dab0335..541c12d6 100644 --- a/src/plugins/apiMessageEvents.ts +++ b/src/plugins/apiMessageEvents.ts @@ -35,7 +35,7 @@ export default definePlugin({ }] }, { - find: "if(e.altKey){", + find: '("interactionUsernameProfile', replacement: { match: /var \w=(\w)\.id,\w=(\w)\.id;return .{1,2}\.useCallback\(\(?function\((.{1,2})\){/, replace: (m, message, channel, event) => diff --git a/src/plugins/betterGifAltText.ts b/src/plugins/betterGifAltText.ts index dbb4d126..f185e04e 100644 --- a/src/plugins/betterGifAltText.ts +++ b/src/plugins/betterGifAltText.ts @@ -16,6 +16,7 @@ * along with this program. If not, see . */ + import { Devs } from "../utils/constants"; import definePlugin from "../utils/types"; @@ -36,9 +37,9 @@ export default definePlugin({ { find: 'preload:"none","aria', replacement: { - match: /\?.{0,5}\.Messages\.GIF/, + match: /(?<==(.{1,3})\.alt.{0,20})\?.{0,5}\.Messages\.GIF/, replace: - "?(e.alt='GIF',Vencord.Plugins.plugins.BetterGifAltText.altify(e))", + "?($1.alt='GIF',Vencord.Plugins.plugins.BetterGifAltText.altify($1))", }, }, ],