Skip to content

Instantly share code, notes, and snippets.

@mugman174
Last active June 18, 2024 23:07
Show Gist options
  • Save mugman174/0a59efe2733407d2041449a0e5815d66 to your computer and use it in GitHub Desktop.
Save mugman174/0a59efe2733407d2041449a0e5815d66 to your computer and use it in GitHub Desktop.
[OLD] Fix for Discord Modifications not Loading (don't use anymore) (client mods work now)

Discord Client Mods

  • These are some great client mods that will work.
  1. Replugged
  2. Vencord
  3. Shelter

Just use one of the client mods above

How to undo the downgrading

  1. Edit the settings.json and remove the WEBAPP_ENDPOINT entry
  2. Do not run Discord with --disable-web-security
    • Windows: "%localappdata%\Discord\app-1.0.9006\Discord.exe" --disable-web-security (but replace the path with where it really is)
    • Other systems: Discord Executable Locations

Ignore the directions below

WARNING: DO NOT JOIN SERVERS WITH THIS OR YOUR ACCOUNT MAY BE TERMINATED (according to eternal) (could not reproduce)

This is a crappy workaround but I haven't found anything else that works

Warning | This is a temporary fix until client mods start working with swc. Swc plugins and mods will not work with this.

If you don't understand what this stuff means, then you probably shouldn't use it.

Instructions

  1. Displunger
  2. Edit the settings.json and add "WEBAPP_ENDPOINT": "http://127.0.0.1:3000/launch/3356503f99cffc142754165f17e9a13bfd708953", in the middle or something (replace http://127.0.0.1:3000/ with the instance you're using)
    • Scroll down to the settings.json section to find the path
  3. Run Discord with --disable-web-security
    • Windows: "%localappdata%\Discord\app-1.0.9006\Discord.exe" --disable-web-security (but replace the path with where it really is)
    • Other systems: Discord Executable Locations

Important - Read This


If you don't know which version to pick, choose Stable.

settings.json

Windows

  • Stable: "%appdata%\discord\settings.json"
  • PTB: "%appdata%\discordptb\settings.json"
  • Canary: "%appdata%\discordcanary\settings.json"
  • Development: "%appdata%\discorddevelopment\settings.json"

macOS

  • Stable: ~/Library/Application\ Support/discord/settings.json
  • PTB: ~/Library/Application\ Support/discordptb/settings.json
  • Canary: ~/Library/Application\ Support/discordcanary/settings.json
  • Development: ~/Library/Application\ Support/discorddevelopment/settings.json

Linux

  • Stable: ~/.config/discord/settings.json
  • PTB: ~/.config/discordptb/settings.json
  • Canary: ~/.config/discordcanary/settings.json
  • Development: ~/.config/discorddevelopment/settings.json

Discord Executable

macOS

  • Stable: /Applications/Discord.app/Contents/MacOS/Discord --disable-web-security
  • PTB: /Applications/Discord\ PTB.app/Contents/MacOS/Discord\ PTB --disable-web-security
  • Canary: /Applications/Discord\ Canary.app/Contents/MacOS/Discord\ Canary --disable-web-security
  • Development: /Applications/Discord\ Development.app/Contents/MacOS/Discord\ Development --disable-web-security

Linux

The location on Linux installs varies per user, most have it in either /usr/share or /opt. That directory will be referred to as $INSTALL

  • Stable: $INSTALL/discord/Discord
  • PTB: $INSTALL/discord-ptb/DiscordPTB
  • Canary: $INSTALL/discord-canary/DiscordCanary
  • Development: $INSTALL/discord-development/DiscordDevelopment

Other things to know:

  • Displunger must be running whenever you start Discord
  • Message links will have the displunger url (e.g. 127.0.0.1:3000) instead of discord.com.
  • You will have to log back in.
    • Login with QR does not work.
  • Trying to use Update.exe in the command for Windows will not work.

Possible Issues

  • Slash commands do not work.
  • Goosemod does not work.
  • Voice channels, stickers, and file uploads work for some users, but not for others.
    • @MichaelDavidGK commented that it should work if you set the WEBAPP_ENDPOINT to HTTPS (SSL)

Misc

@mugman174
Copy link
Author

mugman174 commented Sep 27, 2022

Comment with suggestions, fixes, bugs, or whatever

donate to whoever runs discord.sale if you can, they're making this all work

@gwailou77
Copy link

gwailou77 commented Sep 27, 2022

latest build that works for me is WEBAPP_ENDPOINT": "http://localhost:3000/launch/3356503f99cffc142754165f17e9a13bfd708953" (build after is what broke all the mods)

@rushiiMachine
Copy link

love

@haiku-balls
Copy link

haiku-balls commented Sep 27, 2022

(pacman)
(https://wiki.archlinux.org/title/Discord#Tips_and_tricks)
Paths for Linux:

Settings

~/.config/discord/settings.json
~/.config/discordptb/settings.json
~/.config/discordcanary/settings.json

Executable

/opt/discord/Discord
/opt/discord-ptb/DiscordPTB
/opt/discord-canary/DiscordCanary

@hexa0
Copy link

hexa0 commented Sep 27, 2022

for some reason i needed --disable-gpu to disable CORS however it removes GPU acceleration, any workarounds?

@hexa0
Copy link

hexa0 commented Sep 27, 2022

just removed --disable-gpu after actually signing in, it appears to only be required when signing in?

@MichaelDavidGK
Copy link

Voice channels, stickers, and file uploads might not work unless you set it to HTTPS (SSL)

@SammCheese
Copy link

I'd recommend changing the hosted displunger instance's link to https://displunger.vendicated.dev/ instead.
It's hosted by @Vendicated (VendyMachine#8485) , a more uhhhh trustworthy member of the clientmodding community

@Yoshi24517
Copy link

Yoshi24517 commented Sep 27, 2022

Getting an error on canary:

This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at validateString (internal/validators.js:124:11)
    at join (path.js:375:7)
    at Object.exports.getAppDir (C:\Users\Yoshi24517\powercord\injectors\win32.js:12:23)
    at Object.require.cache.<computed>.exports.update (C:\Users\Yoshi24517\powercord\src\updater.win32.js:16:37)
    at updateOpenOnStartup (C:\Users\Yoshi24517\AppData\Local\DiscordCanary\app-1.0.49\modules\discord_desktop_core-127\discord_desktop_core\core.asar\app\appConfig.js:70:13)
    at IpcMainImpl.<anonymous> (C:\Users\Yoshi24517\AppData\Local\DiscordCanary\app-1.0.49\modules\discord_desktop_core-127\discord_desktop_core\core.asar\app\appConfig.js:42:59)
    at IpcMainImpl.emit (events.js:315:20)
    at IpcMainImpl.EventEmitter.emit (domain.js:467:12)
    at Object.<anonymous> (electron/js2c/browser_init.js:165:9492)
    at Object.emit (events.js:315:20)

EDIT: Resolved, apparently I'm an idiot and forgot a comma on the last argument in the json when adding the WEBAPP argument.

@Absumm
Copy link

Absumm commented Sep 28, 2022

so, if I'm using vendicated's or aspy's hosts do I still need to have displunger open?

@mugman174
Copy link
Author

so, if I'm using vendicated's or aspy's hosts do I still need to have displunger open?

@Absumm if you're using Ven or Aspy's displunger instance, you do not need to run your own on your PC.

@rushiiMachine
Copy link

rushiiMachine commented Nov 8, 2022

The build seems to have been cleared from discords cdn, any alternatives?
vendy's displunger is returning 404s
never mind seems to work now

@Shiggy-dev
Copy link

Shiggy-dev commented Jan 19, 2023

seems to be down again, returning "Build not found"

@rushiiMachine
Copy link

Just hop on vencord or something it's way too outdated at this point

@asportnoy
Copy link

Or the Replugged rewrite

@mugman174
Copy link
Author

seems to be down again, returning "Build not found"

Works fine for me

@mugman174
Copy link
Author

But yes, at this point people should switch to Vencord or the replugged rewrite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment