mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Don't hide details button on rich presence (#48)
This commit is contained in:
parent
1b27bfb351
commit
66f6cd16cd
@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
@ -147,24 +146,22 @@ namespace Bloxstrap.Helpers.Integrations
|
||||
if (thumbnailInfo is not null)
|
||||
placeThumbnail = thumbnailInfo.Data![0].ImageUrl!;
|
||||
|
||||
DiscordRPC.Button[]? buttons = null;
|
||||
|
||||
if (!Program.Settings.HideRPCButtons)
|
||||
List<DiscordRPC.Button> buttons = new()
|
||||
{
|
||||
buttons = new DiscordRPC.Button[]
|
||||
{
|
||||
new DiscordRPC.Button()
|
||||
{
|
||||
Label = "Join",
|
||||
Url = $"https://www.roblox.com/games/start?placeId={ActivityPlaceId}&gameInstanceId={ActivityJobId}&launchData=%7B%7D"
|
||||
},
|
||||
|
||||
new DiscordRPC.Button()
|
||||
{
|
||||
Label = "See Details",
|
||||
Url = $"https://www.roblox.com/games/{ActivityPlaceId}"
|
||||
}
|
||||
};
|
||||
|
||||
if (!Program.Settings.HideRPCButtons)
|
||||
{
|
||||
buttons.Insert(0, new DiscordRPC.Button()
|
||||
{
|
||||
Label = "Join",
|
||||
Url = $"https://www.roblox.com/games/start?placeId={ActivityPlaceId}&gameInstanceId={ActivityJobId}&launchData=%7B%7D"
|
||||
});
|
||||
}
|
||||
|
||||
RichPresence.SetPresence(new RichPresence()
|
||||
@ -172,7 +169,7 @@ namespace Bloxstrap.Helpers.Integrations
|
||||
Details = placeInfo.Name,
|
||||
State = $"by {placeInfo.Creator.Name}",
|
||||
Timestamps = new Timestamps() { Start = DateTime.UtcNow },
|
||||
Buttons = buttons,
|
||||
Buttons = buttons.ToArray(),
|
||||
Assets = new Assets()
|
||||
{
|
||||
LargeImageKey = placeThumbnail,
|
||||
|
Loading…
Reference in New Issue
Block a user