Giter VIP home page Giter VIP logo

Comments (14)

Mstrodl avatar Mstrodl commented on August 24, 2024

@ShadowMitia Hm, looks like we forgot to disable the reconnection code once the mode is disabled

from elcord.

Mstrodl avatar Mstrodl commented on August 24, 2024

@ShadowMitia This should be fixed in the latest commit (0cef4ca)!

from elcord.

ShadowMitia avatar ShadowMitia commented on August 24, 2024

It disconnects fine now, thanks!

But once disconnected it still shows the last update in the Rich Presence in Discord. And it doesn't seem to be going away even after waiting for a while... On the plus side it doesn't update when changing buffers at all!

The only way to make the Rich Presence go back to normal right now is by either quitting emacs or stopping the daemon if running with it.

from elcord.

Mstrodl avatar Mstrodl commented on August 24, 2024

Hm, something tells me that might be more on Discord's end than anything... See if you can take a screenshot of the console in the inspector (ctrl-shift-i) and mark off with arrows or something when you did certain things... :/

from elcord.

ShadowMitia avatar ShadowMitia commented on August 24, 2024

Sorry if this is giving you a headache^^

elcord

Everything looks fine, except that last line with 'RunningGameStore' that only appears after I quit emacs :/
This happens wether I run emacs as a daemon or not.

Let me know if I can give you more information! Wish I could help more, but I don't know too much about elisp yet...

from elcord.

Mstrodl avatar Mstrodl commented on August 24, 2024

Hm, it looks like it might just be Discord tracking the pid we send in the SET_ACTIVITY packet.... I don't think we can actually do anything about that aside from spawning a process that does nothing, using its pid, and killing it after disconnecting

from elcord.

ShadowMitia avatar ShadowMitia commented on August 24, 2024

Yeah, sounds like Discord Rich Presence was not designed for this...

But if it tracks the PID I understand it not working when in daemon mode, but it does the same when emacs is run in standalone. Shouldn't it detect emacs not running anymore then? Maybe I did something, I should probably double check....

from elcord.

Mstrodl avatar Mstrodl commented on August 24, 2024

@ShadowMitia Huh? I'm not sure you understand what I'm saying... I'm trying to say that the mode being disabled currently acts funny because Discord doesn't stop recognizing emacs as being played until the pid we send it is killed, even if we completely disconnect it from Discord's RPC server

from elcord.

ShadowMitia avatar ShadowMitia commented on August 24, 2024

Right, yeah my bad.... Silly remark...

You said to use a dummy process for its PID earlier, but couldn't you have elcord run in that process directly instead? Then you wouldn't have a dummy process^^

from elcord.

Mstrodl avatar Mstrodl commented on August 24, 2024

@ShadowMitia Yeah, but that'd require us to either call a headless emacs and somehow get our information back and forth which imo seems like a kludgy solution... My thought was running something like cat and then we'd be able to kill it at will. Again, just a thought

from elcord.

ShadowMitia avatar ShadowMitia commented on August 24, 2024

Keeping in mind that I'm very new at elisp, and bad at processes, but couldn't having an asynchronous process solve everything?
You would still have the mode active on the main emacs thread, just have the part hooked up to the RPC in a subprocess. But I'm guessing it shares the same PID.

In any case, I think I've made this issue diverge sufficiently from its original purpose^^ You should probably close this. I'm sure a solution will turn up someday^^

from elcord.

Mstrodl avatar Mstrodl commented on August 24, 2024

@ShadowMitia I finally figured out how to do this! After checking the source, we can actually send null as the activity and it will simply clear itself!

from elcord.

ShadowMitia avatar ShadowMitia commented on August 24, 2024

@Mstrodl Congrats! Thanks for working on this issue! I hope it didn't give you any sleepless nights 😁

from elcord.

Mstrodl avatar Mstrodl commented on August 24, 2024

@ShadowMitia No worries, it's more that I stumbled upon it :P

from elcord.

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.