mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Removed the mandatory requirement to enter the '!' after the discord prefix
This commit is contained in:
parent
327103182c
commit
d51c0a95de
14 changed files with 62 additions and 18 deletions
|
|
@ -856,6 +856,9 @@
|
|||
</ArrayOfString>
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="DiscordBotPrefixFixed" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</ServerManagerTool.Config>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
|
|
|
|||
|
|
@ -285,6 +285,13 @@ namespace ServerManagerTool
|
|||
CommonConfig.Default.Save();
|
||||
}
|
||||
}
|
||||
if (!Config.Default.DiscordBotPrefixFixed)
|
||||
{
|
||||
Config.Default.DiscordBotPrefix += "!";
|
||||
Config.Default.DiscordBotPrefixFixed = true;
|
||||
Config.Default.Save();
|
||||
Config.Default.Reload();
|
||||
}
|
||||
|
||||
Config.Default.SteamCmdRedirectOutput = false;
|
||||
}
|
||||
|
|
|
|||
12
src/ARKServerManager/Config.Designer.cs
generated
12
src/ARKServerManager/Config.Designer.cs
generated
|
|
@ -3000,5 +3000,17 @@ namespace ServerManagerTool {
|
|||
this["DiscordBotWhitelist"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool DiscordBotPrefixFixed {
|
||||
get {
|
||||
return ((bool)(this["DiscordBotPrefixFixed"]));
|
||||
}
|
||||
set {
|
||||
this["DiscordBotPrefixFixed"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -830,5 +830,8 @@
|
|||
<string />
|
||||
</ArrayOfString></Value>
|
||||
</Setting>
|
||||
<Setting Name="DiscordBotPrefixFixed" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
|
|
@ -26,6 +26,7 @@
|
|||
<br/>
|
||||
<ul>
|
||||
<li>Made changes to the code to help improve performance.</li>
|
||||
<li>Removed the mandatory requirement to enter the '!' after the discord prefix. The '!' has been added to the existing prefix so to to change the existing prefix, but you can now changeit.</li>
|
||||
<li>zh-CN Translation file updated.</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
<u style="font-size: .9em;">CHANGE</u>
|
||||
<br/>
|
||||
<ul>
|
||||
<li>Removed the mandatory requirement to enter the '!' after the discord prefix. The '!' has been added to the existing prefix so to to change the existing prefix, but you can now changeit.</li>
|
||||
<li>zh-CN Translation file updated.</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -622,6 +622,9 @@
|
|||
</ArrayOfString>
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="DiscordBotPrefixFixed" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</ServerManagerTool.Config>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
|
|
@ -278,6 +278,13 @@ namespace ServerManagerTool
|
|||
Config.Default.UpgradeConfig = false;
|
||||
Config.Default.Save();
|
||||
}
|
||||
if (!Config.Default.DiscordBotPrefixFixed)
|
||||
{
|
||||
Config.Default.DiscordBotPrefix += "!";
|
||||
Config.Default.DiscordBotPrefixFixed = true;
|
||||
Config.Default.Save();
|
||||
Config.Default.Reload();
|
||||
}
|
||||
|
||||
Config.Default.SteamCmdRedirectOutput = false;
|
||||
}
|
||||
|
|
|
|||
12
src/ConanServerManager/Config.Designer.cs
generated
12
src/ConanServerManager/Config.Designer.cs
generated
|
|
@ -2153,5 +2153,17 @@ namespace ServerManagerTool {
|
|||
this["DiscordBotWhitelist"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool DiscordBotPrefixFixed {
|
||||
get {
|
||||
return ((bool)(this["DiscordBotPrefixFixed"]));
|
||||
}
|
||||
set {
|
||||
this["DiscordBotPrefixFixed"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -596,5 +596,8 @@
|
|||
<string />
|
||||
</ArrayOfString></Value>
|
||||
</Setting>
|
||||
<Setting Name="DiscordBotPrefixFixed" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
|
|
@ -26,6 +26,7 @@
|
|||
<br/>
|
||||
<ul>
|
||||
<li>Made changes to the code to help improve performance.</li>
|
||||
<li>Removed the mandatory requirement to enter the '!' after the discord prefix. The '!' has been added to the existing prefix so to to change the existing prefix, but you can now changeit.</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -21,6 +21,11 @@
|
|||
<ul>
|
||||
<li>Server Settings - Discord Bot section - Added an alias that can be used with the discord command instead of the profile id.</li>
|
||||
</ul>
|
||||
<u style="font-size: .9em;">CHANGE</u>
|
||||
<br/>
|
||||
<ul>
|
||||
<li>Removed the mandatory requirement to enter the '!' after the discord prefix. The '!' has been added to the existing prefix so to to change the existing prefix, but you can now changeit.</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
</content>
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
using ServerManagerTool.DiscordBot.Delegates;
|
||||
|
||||
namespace ServerManagerTool.DiscordBot
|
||||
{
|
||||
public static class DiscordBot
|
||||
{
|
||||
public const string PREFIX_DELIMITER = "!";
|
||||
}
|
||||
}
|
||||
|
|
@ -43,15 +43,10 @@ namespace ServerManagerTool.DiscordBot
|
|||
|
||||
Token = token;
|
||||
|
||||
if (commandPrefix.Any(c => !char.IsLetterOrDigit(c)))
|
||||
{
|
||||
throw new Exception("#DiscordBot_InvalidPrefixError");
|
||||
}
|
||||
|
||||
if (!commandPrefix.EndsWith(DiscordBot.PREFIX_DELIMITER))
|
||||
{
|
||||
commandPrefix += DiscordBot.PREFIX_DELIMITER;
|
||||
}
|
||||
//if (commandPrefix.Any(c => !char.IsLetterOrDigit(c)))
|
||||
//{
|
||||
// throw new Exception("#DiscordBot_InvalidPrefixError");
|
||||
//}
|
||||
|
||||
var settings = new Dictionary<string, string>
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue