Jxyme / simple-discord-rpc

Beautify your Discord profile with a fully customizable Discord Rich Presence, now with buttons.
34 stars 6 forks source link

Multi platform support #8

Closed omsenjalia closed 3 years ago

omsenjalia commented 3 years ago

Is there a way to run it on mobile, like using repl.it or other hosting websites?

Jxyme commented 3 years ago

Is there a way to run it on mobile, like using repl.it or other hosting websites?

Unfortunately not. Discord-RPC uses IPC sockets, which only allows the RPC to function on the same device, e.g. your computer.

This also applies when trying to use the Discord-RPC with the web version of Discord, sadly it won't allow it, only the desktop app works.

omsenjalia commented 3 years ago

There can be a solution like UserLAnd/Termux it is a ssh/terminal client for mobile devices, could it work? (For more queries search it up on YT sorry for making you go through this hassle, I just wanted this cool little piece of feature)

omsenjalia commented 3 years ago

I could launch NodeJS on Termux/UserLAnd 👍

Jxyme commented 3 years ago

There can be a solution like UserLAnd/Termux it is a ssh/terminal client for mobile devices, could it work? (For more queries search it up on YT sorry for making you go through this hassle, I just wanted this cool little piece of feature)

If you're using Termux to connect to a server or device where you're running an instance of NodeJS you'll run into the same issues. In order for the Discord-RPC to function you need to be running Discord in the background, on the same device. Just because Termux is running on your phone where Discord is open, doesn't mean the NodeJS instance is running directly on your phone's OS.

I had looked into this a while back because I originally wanted to host the Discord-RPC on my Ubuntu server that's online 24/7 so that my RPC would be active 24/7 too, regardless of the device I was using Discord on at the time, however, since it's on another device/server, it had no way to recognise Discord. This server could be SSH'd into via CMD, Terminal, Terminus and other applications like Termux.. however that didn't change anything since Discord isn't open and logged in on the same Ubuntu server.

omsenjalia commented 3 years ago

Well rip

omsenjalia commented 3 years ago

A guy on another rpc repo suggested this, could it work by any chance? Screenshot_20210922-111624_Brave

Jxyme commented 3 years ago

A guy on another rpc repo suggested this, could it work by any chance?

Screenshot_20210922-111624_Brave

AWS EC2 is a server in the cloud so it would have the same issue. As far as I know there isn't any way to run it 24/7 without having a desktop (this could be a remote one) running both the Discord-RPC and Discord.

omsenjalia commented 3 years ago

Idk any NOT AGAINST TOS way to get an remote desktop server, well, Ty for your replies, have a day/night

omsenjalia commented 3 years ago

Wait! Does the code executes that execute is on mobile work???

Jxyme commented 3 years ago

Wait! Does the code executes that execute is on mobile work???

Not 100% sure what you're asking here, but if you're wanting to know whether the code will execute directly on your phone, then the answer is most certainly not.

omsenjalia commented 3 years ago

I meant the apps that run codes like Acode

Jxyme commented 3 years ago

I meant the apps that run codes like Acode

No, Acode is only a code editor.

Unlike Acode, Termux allows you to host a node server, and run node apps.. however, due to the way Discord-RPC works, it wouldn't work with Termux. The only way you're going to be able to run the Discord-RPC is via a desktop with both Discord and the Discord-RPC running.

omsenjalia commented 3 years ago

Have you tried UserLAnd

omsenjalia commented 3 years ago

Or installing discord on Linux terminal

Jxyme commented 3 years ago

Have you tried UserLAnd

No, I don't own an android device. However, I read up about Termux and UserLAnd when you mentioned them the first time and neither seem to be suitable since you will need to run both Discord and the NodeJS application (Discord-RPC). As explained before, if you try run Discord-RPC on another device or server it will not recognise Discord on your phone and set the RPC.

If you can use UserLAnd to boot a desktop version of Linux, you will need to install and use Discord's application on that same instance, you wouldn't be able to run Discord-RPC on Linux and use the Discord mobile app like normal. To be honest if you'd go through all that effort, you may as well just look up how to run a virtual desktop and install both Discord, NodeJS and run the Discord-RPC on that instead so it's online 24/7.

Or installing discord on Linux terminal

The same applies here. I have not tested Discord-RPC on Linux so you will need to test that out, the same goes for UserLAnd.

Whatever you do, make sure both Discord-RPC and Discord are running on the same machine, otherwise it'll fail.

omsenjalia commented 3 years ago

I will NEED to try installing disc + rpc on userLAnd