From d852393cfb5b253fcbf3b2b1f3baf436c7007af5 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 26 Oct 2023 00:36:23 +0200 Subject: [PATCH] fix UserVoiceShow --- .../userVoiceShow/components/VoiceChannelSection.tsx | 2 +- src/plugins/userVoiceShow/index.tsx | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plugins/userVoiceShow/components/VoiceChannelSection.tsx b/src/plugins/userVoiceShow/components/VoiceChannelSection.tsx index b429f0571..c1bcbd657 100644 --- a/src/plugins/userVoiceShow/components/VoiceChannelSection.tsx +++ b/src/plugins/userVoiceShow/components/VoiceChannelSection.tsx @@ -23,7 +23,7 @@ import { Button, Forms, PermissionStore, Toasts } from "@webpack/common"; import { Channel } from "discord-types/general"; const ChannelActions = findByPropsLazy("selectChannel", "selectVoiceChannel"); -const UserPopoutSection = findByCodeLazy(".lastSection", ".children"); +const UserPopoutSection = findByCodeLazy(".lastSection", "children:"); const CONNECT = 1n << 20n; diff --git a/src/plugins/userVoiceShow/index.tsx b/src/plugins/userVoiceShow/index.tsx index 85c1bedf1..c95307cc4 100644 --- a/src/plugins/userVoiceShow/index.tsx +++ b/src/plugins/userVoiceShow/index.tsx @@ -94,19 +94,19 @@ export default definePlugin({ }, patches: [ + // above message box { - find: ".showCopiableUsername", + find: ".lastEditedByContainer", replacement: { - match: /\(0,\w\.jsx\)\(\w{2},{user:\w,setNote/, - // paste my fancy custom button above the message field + match: /\(0,\i\.jsx\)\(\i\.\i,{user:\i,setNote/, replace: "$self.patchPopout(arguments[0]),$&", } }, + // below username { find: ".USER_PROFILE_MODAL", replacement: { - match: /\(\)\.body.+?displayProfile:\i}\),/, - // paste my fancy custom button below the username + match: /\.body.+?displayProfile:\i}\),/, replace: "$&$self.patchModal(arguments[0]),", } }