[Archived] roPresence - Rich Presence for Roblox

One of my friends (@theLMGN) made something similar to this a while back, but it isn’t as complex as this.
Nice work on this project :smiley:

4 Likes

The presence is now working again, just refreshed the cookie.

3 Likes

Just messed around with this; used a package I created a while ago called bloxauth-win to request presence data, and it works pretty well:

Test code
const bloxauth = require('bloxauth-win'),
      discord = require('discord-rpc'),
      rpc = new discord.Client({ transport: 'ipc' });

rpc.on('ready', async () => {
    bloxauth.getCurrentUser().then(currentUser => {
        const getPresence = () => {
            bloxauth.request({
                uri: `https://www.roblox.com/presence/user?userId=${currentUser.UserID}`
            }).then(presence => {
                let rpcInfo = {}, setInfo = true;

                switch (presence.UserPresenceType) {
                    case 2:
                        rpcInfo.details = 'Playing a game';
                        rpcInfo.state = `${presence.LastLocation}`;
                        break;
                    case 3:
                        rpcInfo.details = 'Developing in Studio';
                        rpcInfo.state = `${presence.LastLocation}`;
                        break;
                    default:
                        setInfo = false;
                        break;
                }

                if (!setInfo) {
                    rpc.clearActivity();
                } else {
                    rpcInfo.instance = false;
                    rpc.setActivity(rpcInfo);
                }
            });
        }

        getPresence();
        setInterval(getPresence, 15e3);
    });
});

rpc.login({ clientId: '595172822410592266' });

Yes, I used your clientId; sorry! :grimacing:

…and since I’m logging in with my own cookie (from Studio), it can request my location, regardless of privacy settings.

Obviously, this is Windows-specific again

4 Likes

Interesting, is your package available on NPM/GitHub?

Nevermind, didn’t see the link.

4 Likes

I’m looking at this now. :slight_smile:

4 Likes

I’ve had a go at my own implementation using my bloxauth-win package.

Details

Download+Source Code:
https://github.com/ClockworkSquirrel/roblox-discord-presence

In-Game

image

Information Displayed

Roblox
Username
Game Name (Server Capacity)
Time Played

In Studio

image

Privacy Settings

image

Just a note for anyone who wants to try it; it is Windows only!

4 Likes

Why is it windows only?

Not a problem for me, but for other users,

5 Likes

my version is Windows only simply because it gets your login cookie from the Windows registry

Edit: @JiveOff’s proper version should be compatible with all OS, as it’s using external servers, and requires you to connect your Roblox to Discord via roVerify.

4 Likes

Your solution is very nice.
I will mention it on the git README when I have time.

Thanks for the contribution!

4 Likes

Will take a look into this!
Good job.

3 Likes

Really good work!

This was super easy to install and worked almost immediately. I also really like the little end connection page, it feels really clean.

4 Likes

This is awesome sauce.

Thank you for this!

4 Likes

Hey Jive,
I’ve got a really small change for RoPresence;
Is it worth sending a pull request yet?
The change is important but small.
Thanks,
Sasial.

3 Likes

Feel free to make a PR. :slight_smile:

3 Likes

I like this, it reminds me of the days where we had cmd prompt open before spotify presence was built it. Hope that roblox does something like this

4 Likes

Any chance of this being available to download for MacOS systems using terminal instead of the normal CMD prompt on windows?

1 Like

Wow, sounds great. Going to check it out.

2 Likes

There is a macOS part on the README.md, which part are you struggling with?

1 Like

Nice job! Can you also make it so if we’re in studio it shows the studio logo instead of the normal one? Thanks!

1 Like

Ah cheers, didn’t see that. Must of missed it…

1 Like