fix UserVoiceShow

This commit is contained in:
Vendicated 2023-10-26 00:36:23 +02:00
parent 0c12500c0a
commit d852393cfb
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18
2 changed files with 6 additions and 6 deletions

View file

@ -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;

View file

@ -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]),",
}
}