Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work with new discord version #9

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Work with new discord version #9

wants to merge 3 commits into from

Conversation

giorgi-o
Copy link
Owner

@giorgi-o giorgi-o commented Nov 3, 2022

This uses a custom preload script to inject into discord's main process and expose some custom functions for opening net/tls sockets, therefore working almost like before the update.

I say almost, because some extra setup is required to get it working:

  • Go to %localappdata%/Discord/App-1.0.XXXX/resources/app
  • put CPP_preload.js in that folder, next to index.js
  • Open index.js, and above the require(...\\BetterDiscord.asar) line, paste everything in add_this_to_index.js
  • Close Discord with Alt+F4 (Ctrl+R isn't enough)

Once you reopen Discord, you can install the beta version of the plugin as usual in the plugins folder.

The short term plan is to automate this process, so that it happens in one click when you first install the plugin.
The long term plan is to try and get the net/tls wrappers integrated into BetterDiscord itself, to not need to do this setup at all.

Let me know if anything doesn't work, either by opening a new issue or replying to this PR :)

@ZeddPerm
Copy link

Getting a TypeError: Cannot read property 'children' of undefined)
image

image

@giorgi-o
Copy link
Owner Author

Yup, seems to happen when you open the settings panel. It's a bug with ZeresPluginLibrary, so we gotta wait for them to fix it.

In the meantime you can always edit CrossPlatformPlaying.config.json directly if you need to.

@ZeddPerm
Copy link

I'm getting a different error when trying to open the settings panel now.
image

@ZeddPerm
Copy link

ZeddPerm commented Dec 1, 2022

Yup, seems to happen when you open the settings panel. It's a bug with ZeresPluginLibrary, so we gotta wait for them to fix it.

In the meantime you can always edit CrossPlatformPlaying.config.json directly if you need to.

Could you elaborate on what the exact issue with ZeresPluginLibrary is? I would like to open an issue about it in their github repo. Or you can open the issue yourself.

@JustinsKittens
Copy link

Whenever I add the contents of add_this_to_index.js to index.js and Alt+F4 Discord, Discord doesn't re-open until I revert the changes to index.js

Please help!

@Bamboozul
Copy link

Instead of going to %localappdata%/Discord/App-1.0.XXXX/resources/app go to %localappdata%/Discord/App-1.0.XXXX/modules/discord_desktop_core-1/discord_desktop_core and then proceed with the rest of the steps.

@Cloakster0
Copy link

Hi, is this plugin still being updated?

@CHICKENMAN1128
Copy link

I do not see any file or anything named app under resources. Might just be on my side but would appreciate any help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants