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!