diff --git a/OpenRA.Game/Settings.cs b/OpenRA.Game/Settings.cs index 5fd32b3e53..a0eafc43f4 100644 --- a/OpenRA.Game/Settings.cs +++ b/OpenRA.Game/Settings.cs @@ -262,6 +262,9 @@ namespace OpenRA public MPGameFilters MPGameFilters = MPGameFilters.Waiting | MPGameFilters.Empty | MPGameFilters.Protected | MPGameFilters.Started; public bool PauseShellmap = false; + + [Desc("Allow mods to enable the Discord service that can interact with a local Discord client.")] + public bool EnableDiscordService = true; } public class Settings diff --git a/OpenRA.Mods.Common/DiscordService.cs b/OpenRA.Mods.Common/DiscordService.cs index c404ecdb73..c405e5bd0f 100644 --- a/OpenRA.Mods.Common/DiscordService.cs +++ b/OpenRA.Mods.Common/DiscordService.cs @@ -43,6 +43,9 @@ namespace OpenRA.Mods.Common if (instance != null) return instance; + if (!Game.Settings.Game.EnableDiscordService) + return null; + if (!Game.ModData.Manifest.Contains()) return null;