GithubHelp home page GithubHelp logo

Doesn't work on MacOS about coc-discord-rpc HOT 8 CLOSED

K-NRS avatar K-NRS commented on July 27, 2024
Doesn't work on MacOS

from coc-discord-rpc.

Comments (8)

Vaansh avatar Vaansh commented on July 27, 2024 10

If you haven't figured it out, here is what worked for me:

  1. $ find /private/var/folders -name "*discord-ipc*" 2> /dev/null
    in my case it returned: /private/var/folders/g3/znz8yyl55ls27thh9l56x6rr0000gn/T/discord-ipc-0
  2. Go into /.config/coc/extensions/node_modules/coc-discord-rpc/lib and open index.js.
  3. Change line 3046 from return ${prefix.replace(/\/$/, '')}/discord-ipc-${id}; to return /var/folders/g3/znz8yyl55ls27thh9l56x6rr0000gn/T/discord-ipc-${id};

Configure 3. to return your discord pic path accordingly, and put both the returns in backticks.

from coc-discord-rpc.

K-NRS avatar K-NRS commented on July 27, 2024 2

@Vaansh znz8yyl55ls27thh9l56x6rr0000gn is this value static? If so, then I can modify the RPC library to detect whether it is running on macOS or not.

The value is not static. Mine was different.

from coc-discord-rpc.

Vaansh avatar Vaansh commented on July 27, 2024 2

@leonardssh No, I do not think it is static since it’s different from someone’s path in another issue.

from coc-discord-rpc.

giovankes avatar giovankes commented on July 27, 2024 2

If you haven't figured it out, here is what worked for me:

1. `$ find /private/var/folders -name "*discord-ipc*" 2> /dev/null`
   in my case it returned: `/private/var/folders/g3/znz8yyl55ls27thh9l56x6rr0000gn/T/discord-ipc-0`

2. Go into `/.config/coc/extensions/node_modules/coc-discord-rpc/lib` and open `index.js`.

3. Change line 3046 from `return ${prefix.replace(/\/$/, '')}/discord-ipc-${id};` to `return /var/folders/g3/znz8yyl55ls27thh9l56x6rr0000gn/T/discord-ipc-${id};`

Configure 3. to return your discord pic path accordingly, and put both the returns in backticks.

i love u man it works

from coc-discord-rpc.

K-NRS avatar K-NRS commented on July 27, 2024

It worked for me too, thank you. Should be fixed in the project also.

from coc-discord-rpc.

leonardssh avatar leonardssh commented on July 27, 2024

@Vaansh znz8yyl55ls27thh9l56x6rr0000gn is this value static? If so, then I can modify the RPC library to detect whether it is running on macOS or not.

from coc-discord-rpc.

leonardssh avatar leonardssh commented on July 27, 2024

Hmm, then, there is another solution, we could execute find /private/var/folders -name "*discord-ipc*" 2> /dev/null using child_process, and that's how we find the path where the discord-ipc is. But I'm going to need one of you for tests if you want to help me. 😊

from coc-discord-rpc.

leonardssh avatar leonardssh commented on July 27, 2024

It seems that there is already a PR with a solution to this problem: discordjs/RPC#113

from coc-discord-rpc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.