From 9eab92e90aff1b86bd2aff78fcc09c315f223729 Mon Sep 17 00:00:00 2001 From: teinarss Date: Tue, 21 Sep 2021 18:34:58 +0200 Subject: [PATCH] Add Rich Presence button with link to website --- OpenRA.Mods.Common/DiscordService.cs | 10 +++++++++- OpenRA.Mods.Common/OpenRA.Mods.Common.csproj | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/DiscordService.cs b/OpenRA.Mods.Common/DiscordService.cs index 216a49f9ef..0a1b39ff03 100644 --- a/OpenRA.Mods.Common/DiscordService.cs +++ b/OpenRA.Mods.Common/DiscordService.cs @@ -168,7 +168,15 @@ namespace OpenRA.Mods.Common }, Timestamps = timestamp.HasValue ? new Timestamps(timestamp.Value) : null, Party = party, - Secrets = secrets + Secrets = secrets, + Buttons = new[] + { + new Button + { + Label = "Visit Website", + Url = Game.ModData.Manifest.Metadata.Website + } + } }; client.SetPresence(richPresence); diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index ab3a45cd6a..e9d892604e 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -5,7 +5,7 @@ - +