Pieloaf/BetterDiscordPlugins

Not working

Opened this issue · 11 comments

When I press the hide button it isn't hide the sidebar.
Here is the error:
image

I think the guy is dead

Sorry I'm just very busy, at the end of my bachelors degree at the minute and have a few job interviews so been pretty pre occupied, although I know what the error is just need time to look at fixing it

It is alright man take your time we just wanna know if your still working on the error that's all

Alright thanks :) tbh I know what the error is there's a fix that uses the BD api to dynamically get the components, but it doesnt work on my install, and another person also had an issue with it so i did it a different way but had asked about why the "proper" way wasn't working on my install before but the person wasn't too sure and what I had was working so I just left it and now it's broken again so probs gonna ask the new BD dev server to see if anyone knows just to get rid of this issue properly

Ask strencher or any bd plugins dev they will help

Yeah it was Qb who I was talking about it before but yeah will ask one of the devs when I have some time to look at it again

Did this issue ever get resolved? It still doesn't work, but it would theoretically do exactly what I'm looking for so would love to know!

Did this issue ever get resolved? It still doesn't work, but it would theoretically do exactly what I'm looking for so would love to know!

No sorry :( Since the last messages in this thread I got a job abroad and moved country and now working 2 software dev jobs so haven't had time to work on anything else really.

Ngl at this point, it's unlikely I'll fix it since I don't even use better discord anymore because I'm not on discord enough now to need/want the plugins and keep them updated, etc :/ it's also been a long time and there's been some big changes to the BD API since I last looked at it.

Not a long term solution, but I was able to get it working by changing sidebarSelector like so:

  const sidebarSelector = createSelector(
       //BdApi.findAllModules(m => m.sidebar)[1].sidebar
       document.querySelectorAll('[class^="sidebar"]')[0].className
   );

The problem is with the dynamic finding. I wouldn't worry about messing with it too much until BetterDiscord updates the documentation anyway. There is a lot of stuff being deprecated that hasn't had clear alternatives laid out yet.

Yeah, that's the thing I wanted to avoid, doing it this means pretty much constantly having to update it when a new discord update is released. I skimmed over the new BD docs recently and it's a lot better than before but yeah not quite there yet.

If you wanna make a PR for this change I can merge it as a temporary fix, or if not I can do it manually tomorrow but I won't be doing it with every discord update that breaks it again 😅 the issue with dynamical finding elements is what killed this plug-in in the first place haha

I haven’t had a chance to upload to github for a PR. I definitely don’t expect you to keep it updated with all the Discord changes, just wanted to share my workaround while waiting for BD to get their documentation together. I might consider forking and taking this over from you, but as of right now there is no better way to implement it without clear documentation. BD seems like they have a good system going, I just don’t want to reverse engineer it for one plugin..