diff --git a/PlatformIndicators/index.jsx b/PlatformIndicators/index.jsx index 69670f2..e15ea59 100644 --- a/PlatformIndicators/index.jsx +++ b/PlatformIndicators/index.jsx @@ -37,7 +37,7 @@ export default class PlatformIndicators { obj.decorators = [ obj.decorators, ]; @@ -66,28 +66,32 @@ export default class PlatformIndicators { const MemberItem = Webpack.getByKeys("AVATAR_DECORATION_PADDING"); Patcher.after(MemberItem, "default", (_, [props], ret) => { - const obj = findInReactTree(ret, e => e?.avatar && e?.name); - + const children = ret.props.children(); + const obj = findInReactTree(children, e => e?.avatar && e?.name); if (obj) { - obj.decorators = [ - obj.decorators, + children.props.decorators?.props?.children.push( - ]; + ) } + // discord made it a method to return the children :( + ret.props.children = () => { + return children; + }; }); } patchUsername() { const ChatUsername = Webpack.getByKeys("UsernameDecorationTypes"); - Patcher.before(ChatUsername, "default", (_, [props]) => { - if (!Array.isArray(props.decorations[1])) props.decorations[1] = []; - props.decorations[1].unshift( + Patcher.before(ChatUsername, "default", (_, props) => { + const mainProps = props[0]; + if (!Array.isArray(mainProps.decorations[1])) mainProps.decorations[1] = []; + mainProps.decorations[1].unshift( ); diff --git a/PlatformIndicators/package.json b/PlatformIndicators/package.json index 44a1bca..e9837d4 100644 --- a/PlatformIndicators/package.json +++ b/PlatformIndicators/package.json @@ -1,6 +1,6 @@ { "name": "APlatformIndicators", - "version": "1.5.4", + "version": "1.5.5", "authors": [ { "name": "Strencher",