Skip to content

Commit

Permalink
Make RP button text more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzaboxer committed Jul 24, 2023
1 parent 3aafa14 commit 72f034c
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions Bloxstrap/Integrations/DiscordRichPresence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,24 +155,23 @@ public async Task<bool> SetCurrentGame()
App.Logger.WriteLine($"[DiscordRichPresence::SetCurrentGame] Got Universe thumbnail as {icon}");
}

List<Button> buttons = new()
{
new Button
{
Label = "See Details",
Url = $"https://www.roblox.com/games/{placeId}"
}
};
List<Button> buttons = new();

if (!App.Settings.Prop.HideRPCButtons && _activityWatcher.ActivityServerType == ServerType.Public)
{
buttons.Insert(0, new Button
buttons.Add(new Button
{
Label = "Join",
Label = "Join server",
Url = $"roblox://experiences/start?placeId={placeId}&gameInstanceId={_activityWatcher.ActivityJobId}"
});
}

buttons.Add(new Button
{
Label = "See game page",
Url = $"https://www.roblox.com/games/{placeId}"
});

// so turns out discord rejects the presence set request if the place name is less than 2 characters long lol
if (universeDetails.Name.Length < 2)
universeDetails.Name = $"{universeDetails.Name}\x2800\x2800\x2800";
Expand Down

0 comments on commit 72f034c

Please sign in to comment.