From 1aa8d79108e85c2bb2760f2bb5095255c53de4ee Mon Sep 17 00:00:00 2001 From: Brett Hewitson Date: Thu, 14 Apr 2022 21:06:14 +1000 Subject: [PATCH] Discord Bot Changes - Have added All Profiles Alias global settings - Have changed the discord bot to handle the All Profile alias to performs commands against all profiles in the channel. --- src/ARKServerManager/App.config | 3 + src/ARKServerManager/Config.Designer.cs | 12 + src/ARKServerManager/Config.settings | 3 + .../Globalization/en-US/en-US.xaml | 3 + .../UserControls/GlobalSettingsControl.xaml | 21 +- .../UserControls/ServerSettingsControl.xaml | 2 +- .../Utils/DiscordBotHelper.cs | 1009 +++++++++-------- src/ARKServerManager/VersionFeed.xml | 6 +- src/ARKServerManager/VersionFeedBeta.xml | 26 +- src/ConanServerManager/App.config | 3 + src/ConanServerManager/Config.Designer.cs | 12 + src/ConanServerManager/Config.settings | 3 + .../Globalization/en-US/en-US.xaml | 2 + .../UserControls/GlobalSettingsControl.xaml | 19 +- .../Utils/DiscordBotHelper.cs | 1009 +++++++++-------- src/ConanServerManager/VersionFeed.xml | 26 +- src/ConanServerManager/VersionFeedBeta.xml | 15 +- .../Modules/ServerCommandModule.cs | 37 +- .../Modules/ServerQueryModule.cs | 42 +- 19 files changed, 1227 insertions(+), 1026 deletions(-) diff --git a/src/ARKServerManager/App.config b/src/ARKServerManager/App.config index 5de97710..d7a7fbd1 100644 --- a/src/ARKServerManager/App.config +++ b/src/ARKServerManager/App.config @@ -885,6 +885,9 @@ Broadcast + + all + diff --git a/src/ARKServerManager/Config.Designer.cs b/src/ARKServerManager/Config.Designer.cs index 1fc7c1c5..ea32bcf9 100644 --- a/src/ARKServerManager/Config.Designer.cs +++ b/src/ARKServerManager/Config.Designer.cs @@ -3138,5 +3138,17 @@ namespace ServerManagerTool { this["RCON_MessageCommand"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("all")] + public string DiscordBotAllServersKeyword { + get { + return ((string)(this["DiscordBotAllServersKeyword"])); + } + set { + this["DiscordBotAllServersKeyword"] = value; + } + } } } diff --git a/src/ARKServerManager/Config.settings b/src/ARKServerManager/Config.settings index 9485ab3a..2337fce5 100644 --- a/src/ARKServerManager/Config.settings +++ b/src/ARKServerManager/Config.settings @@ -863,5 +863,8 @@ Broadcast + + all + \ No newline at end of file diff --git a/src/ARKServerManager/Globalization/en-US/en-US.xaml b/src/ARKServerManager/Globalization/en-US/en-US.xaml index efbfe0f7..64797b7b 100644 --- a/src/ARKServerManager/Globalization/en-US/en-US.xaml +++ b/src/ARKServerManager/Globalization/en-US/en-US.xaml @@ -639,6 +639,8 @@ Log Level: Get Token... Help... + All Profiles Alias: + The alias to use when sending a command via discord to all profiles associated with a discord channel. Do not include spaces or special characters. To disable the All Profiles alias, clear the value. Allow All Bots If enabled, the server manager bot will respond to all other bots, otherwise they will be ignored unless they are in the whitelist. Bot Whitelist @@ -5648,6 +5650,7 @@ Multiple profiles with '{0}' were found in the channel, command aborted. Profile '{0}' is in a state '{1}' that cannot run this command. Profile '{0}' is currently being updated. + No profiles are associated with the channel. Call to server '{0}' failed. A backup request for server '{0}' has been sent. diff --git a/src/ARKServerManager/UserControls/GlobalSettingsControl.xaml b/src/ARKServerManager/UserControls/GlobalSettingsControl.xaml index 6bd7805d..8daf7a14 100644 --- a/src/ARKServerManager/UserControls/GlobalSettingsControl.xaml +++ b/src/ARKServerManager/UserControls/GlobalSettingsControl.xaml @@ -620,22 +620,25 @@