HelloWorld017 / atom-discord

Integrate with Discord and show Rich Presence information.
https://atom.io/packages/atom-discord
MIT License
105 stars 28 forks source link

Atom-Discord detects Atom's background process and keeps the RichPresence #11

Closed TheOnlyArtz closed 5 years ago

TheOnlyArtz commented 6 years ago

Hey there! First of all, this is a super cool package for Atom But... There's a bug, We know that when we're closing Atom there's a background process that runs for Updates and Booting the software faster. Atom-Discord detects those and thinks I'm still inside Atom, so the RichPresence will never get off my profile

Zoddo commented 6 years ago

hmm... That's weird, when I close Atom, there is not processes remaining.

Maybe this is provided by some kind of packages?

HelloWorld017 commented 6 years ago

Okay, I'll add expire time when next commit.

HelloWorld017 commented 6 years ago

I found out that adding endTimestamp only makes elapsed to left. I think the fundamental solution is tracking opened windows.

memes2545 commented 6 years ago

I have this same problem and it is still not working correctly and there is no background process on my pc and it is still going.

HelloWorld017 commented 6 years ago

If there is no background process, it may bug of Discord. Because Discord detects process and only shows Rich Presence of running process.

TheOnlyArtz commented 6 years ago

That's so weird I got some. Maybe external packages?

HelloWorld017 commented 6 years ago

Is the issue have solved?

HelloWorld017 commented 6 years ago

I added a code to destroy RPC Client properly.

TheOnlyArtz commented 6 years ago

Nice! It's solved

HelloWorld017 commented 6 years ago

I can't find out the reason this error is occured.

HelloWorld017 commented 6 years ago

According to Hallo89 (#24), there's a brief moment that Discord detects not playing. When I record log output, after destroying RPC Client, the Discord detects not playing and although neither packets are sent nor reopened RPC, Discord detects I am playing again.

HelloWorld017 commented 6 years ago

Maybe removing inactivity packet help solving this issue.

TheOnlyArtz commented 6 years ago

That can be reasonable, can't you just destroy the client when Atom shuts down?

Maluscat commented 6 years ago

It also appears that sometimes this issue doesn't appear, but I can't see what exactly triggers it. I have some theses for this:

  1. Somehow the API's react time overlaps in a different way than usual, so this bug doesn't happen
  2. It's something to do with how the rich presence is handled within the 'games' tab in Discord (as it's just a blank space, idk
  3. A friend told me that also Osu has a problem kind of like this, when one closes the game, Discord still shows "playing: Osu", but with rich presence (showing 'idle'), so maybe it is a problem on Discord's side after all

Now, I have no idea of programming beside html/css, so this might sound stupid, but I hope this helps anyway ^^

TheOnlyArtz commented 6 years ago

Sorry to make you get bad but HTML / CSS aren't programming languages, and if you think about it deeply, JavaScript isn't too, HTML is a markup language and JavaScript is a scripting language

Maluscat commented 6 years ago

... I am, indeed, aware of that by all means

TheOnlyArtz commented 6 years ago

image Well... Looks like it fucks up even more now @HelloWorld017

Maluscat commented 6 years ago

What's different? That's exactly what this issue consists of

TheOnlyArtz commented 6 years ago

No, The issue was the rich presence was still on, now it's just the name

Maluscat commented 6 years ago

Yeah okay, but I pointed it out earlier :D see #24

arten1337 commented 6 years ago

screenshot from 2018-08-11 20-45-37 it only shows this for me