Allow developers to enable Discord Rich Presence

What is Discord Rich Presence?

Discord Rich Presence is a feature on Discord that allows supported games to make it easier to join friends, spectate friends, and other features.

Why have Discord Rich Presence on Roblox Games?

Discord Rich Presence allows users to find your game easier, if you enable this feature players would be able to easily hop into the game and spectate their friends, join their party, or just join their game.

How could we stop bad people from abusing this?

The game option to enable Discord Rich Presence would only be accessible to games with above 1k visits.

Okay, this sounds cool, but what would it look like?

Discord rich presence often times looks somewhat like this:
image

(If you want to talk to me, don’t add me on discord, dm me on the devforums, thank you.)

How would this even be implementable in my game???

I would think that roblox would add this via a new roblox lua service

I would hope Roblox would give us function and/or properties for each entry in the “Update presence payload fields” section of the Discord Rich Presence page, but honestly if Roblox added any form of rich presence it would be nice.

72 Likes

That would be good, but i’m not sure about the discord’s side of this.

3 Likes

I’m going to go ahead and bump this feature request since it’s a feature that I think almost all developers on the platform will benefit positively from and it doesn’t seem like it’s got that much traction.

As the OP has already stated, Discord Rich Presence allows your game to be exposed to the massive userbase that Discord has. It’s essentially a free form of advertising! If Roblox were to integrate it right, players will be able to hop straight into their friends game right from Discord, without even needing to visit the Roblox website!

If Roblox were to make the API extensible enough we would be able to specify a custom button, like Spectate, which we would then be able to check from in-game. It could work similarly to TeleportService’s LocalPlayerArrivedFromTeleport event, where the game can access information about which button was pressed and whether or not the player joined via rich presence. Using that you can then put the player straight into spectate mode against the player they just joined (if we’re still going with the spectate example).


However, the above example would be very, very difficult to pull-off with the current state of Roblox’s Discord integration. Let me explain:

How does Roblox know which player you’re joining when you press that button? Roblox currently has no way of connecting a Discord account to Roblox. This is the main roadblock I see with this feature. It’s just too limited without knowing who a Discord account belongs to.

Another fairly big issue I see with a feature like this is making sure that the content put into the presence is appropriate. Sure, you can force the filter on the content, but I think we all know how that will go. For example, what if you’re trying to say how much longer is left in a match?

(Rich presence example, the game icon would be at the left)

Roblox
Very cool game (Game name)
In-match
#### ####### remaining

Join (button)    Spectate (button)

Do you see the issue? This becomes even bigger because it’d look bad for both Roblox and Discord. Unlike a usual game utilizing Rich Presence, Roblox is a platform and has no vetting process for games before a new update (unlike platforms like Xbox). This means that Discord can’t just take their usual approach and block an abusive app because it’d be blocking the whole Roblox rich presence application.

Those are two of the major hurdles that I think need to be solved, and solved properly, before this feature can be truly viable.


Using visits as a method of vetting is a very, very, bad idea. It’s insanely easy to bot to 1k visits if you have malicious intents. Personally, I think having any requirement for accessing this feature is a bad idea.


As for actually using this in-game, I propose a new service!

PresenceService could be used for all sorts of presences as Roblox grows - not just Discord! For example, Xbox also has a system very similar to Discord’s Rich Presence. Here’s a potential code example:

-- Local script
local PresenceService = game:GetService('PresenceService')

PresenceService:SetDiscordPresence(...)
PresenceService:SetXboxPresence(...)
etc, etc

-- Local script in ReplicatedFirst
PresenceService.ArrivedFromPresence:Connect(function(data)
    local button = data.Button
    local Followed = data.Followed -- Player they joined

    if button == Enum.PresenceButton.Play then
        ...
    elseif button == Enum.PresenceButton.Custom then
        local buttonText = data.ButtonText -- Something like Spectate
    end
end)

I’m curious what people think of my suggestions! Please give this thread some support and attention!

28 Likes

Bumping this as I think it would be an amazing feature to have discord rich presence in Roblox. In addition to what was said above, maybe to determine which user you’re joining it would have to be a user who linked their discord account to Roblox with a new site feature to connect your discord account.

14 Likes

There’s an open source Node.js app that will allow you to use presences, provided the game developer of the game you’re playing also enables it :

It is less clean than a built-in solution of course, but not a million miles off. We have support for it in Stepford County Railway as an example.

4 Likes

I don’t understand why Roblox hasn’t implemented this feature yet. Rich presence is supported in nearly every up to date game I can think of, and not just through a simple implementation where you can see the name of the game (which in Roblox’s case is literally just “Roblox”).

If Roblox gets on top of this, developers should be able to have a fully integrated rich presence service, allowing the addition of game details, whether it be an FPS game providing details such as the users score, the map they’re on, time in the round left, or a rhythm game like RoBeats providing details on the current song being played, time left, accuracy, etc.

The possibilities for this kind of thing are limitless, and considering Roblox’s current direction in boosting social aspects of the platform, I see no reason to delay the addition of rich presence any further. I should be able to see more than just “Playing Roblox” when my friends are doing stuff, it’s no different from if I were to see only the game engine people are playing on and not the actual game itself.

Also I should mention, if privacy concerns are present, users can simply disable Discord’s rich presence feature for Roblox specifically, or if Roblox wants to put in the extra effort, add another privacy setting to the user settings page.

4 Likes