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.IO;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
@ -147,24 +146,22 @@ namespace Bloxstrap.Helpers.Integrations
|
|||||||
if (thumbnailInfo is not null)
|
if (thumbnailInfo is not null)
|
||||||
placeThumbnail = thumbnailInfo.Data![0].ImageUrl!;
|
placeThumbnail = thumbnailInfo.Data![0].ImageUrl!;
|
||||||
|
|
||||||
DiscordRPC.Button[]? buttons = null;
|
List<DiscordRPC.Button> buttons = new()
|
||||||
|
|
||||||
if (!Program.Settings.HideRPCButtons)
|
|
||||||
{
|
{
|
||||||
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()
|
new DiscordRPC.Button()
|
||||||
{
|
{
|
||||||
Label = "See Details",
|
Label = "See Details",
|
||||||
Url = $"https://www.roblox.com/games/{ActivityPlaceId}"
|
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()
|
RichPresence.SetPresence(new RichPresence()
|
||||||
@ -172,7 +169,7 @@ namespace Bloxstrap.Helpers.Integrations
|
|||||||
Details = placeInfo.Name,
|
Details = placeInfo.Name,
|
||||||
State = $"by {placeInfo.Creator.Name}",
|
State = $"by {placeInfo.Creator.Name}",
|
||||||
Timestamps = new Timestamps() { Start = DateTime.UtcNow },
|
Timestamps = new Timestamps() { Start = DateTime.UtcNow },
|
||||||
Buttons = buttons,
|
Buttons = buttons.ToArray(),
|
||||||
Assets = new Assets()
|
Assets = new Assets()
|
||||||
{
|
{
|
||||||
LargeImageKey = placeThumbnail,
|
LargeImageKey = placeThumbnail,
|
||||||
|
Loading…
Reference in New Issue
Block a user