diff --git a/NadekoBot/Classes/JSONModels/Configuration.cs b/NadekoBot/Classes/JSONModels/Configuration.cs index 3b7a612a..99bfd3c6 100644 --- a/NadekoBot/Classes/JSONModels/Configuration.cs +++ b/NadekoBot/Classes/JSONModels/Configuration.cs @@ -11,6 +11,7 @@ namespace NadekoBot.Classes.JSONModels { public bool IsRotatingStatus { get; set; } = false; public bool SendPrivateMessageOnMention { get; set; } = false; public List RotatingStatuses { get; set; } = new List(); + public CommandPrefixesModel CommandPrefixes { get; set; } = new CommandPrefixesModel(); public HashSet ServerBlacklist { get; set; } = new HashSet(); public HashSet ChannelBlacklist { get; set; } = new HashSet(); public HashSet UserBlacklist { get; set; } = new HashSet() { @@ -46,6 +47,20 @@ namespace NadekoBot.Classes.JSONModels { }; } + public class CommandPrefixesModel + { + public string Administration { get; set; } = "."; + public string Searches { get; set; } = "~"; + public string NSFW { get; set; } = "~"; + public string Conversations { get; set; } = "<@{0}>"; + public string ClashOfClans { get; set; } = ","; + public string Help { get; set; } = "-"; + public string Music { get; set; } = "!m"; + public string Trello { get; set; } = "trello"; + public string Games { get; set; } = ">"; + public string Gambling { get; set; } = "$"; + } + public static class ConfigHandler { private static readonly object configLock = new object(); public static void SaveConfig() { diff --git a/NadekoBot/Modules/Administration.cs b/NadekoBot/Modules/Administration.cs index 51e50ddf..beb5852f 100644 --- a/NadekoBot/Modules/Administration.cs +++ b/NadekoBot/Modules/Administration.cs @@ -23,7 +23,7 @@ namespace NadekoBot.Modules { commands.Add(new VoicePlusTextCommand(this)); } - public override string Prefix { get; } = "."; + public override string Prefix { get; } = NadekoBot.Config.CommandPrefixes.Administration; public override void Install(ModuleManager manager) { manager.CreateCommands("", cgb => { diff --git a/NadekoBot/Modules/Trello.cs b/NadekoBot/Modules/Trello.cs index f60d32ca..eaaf8ab1 100644 --- a/NadekoBot/Modules/Trello.cs +++ b/NadekoBot/Modules/Trello.cs @@ -10,7 +10,7 @@ using Action = Manatee.Trello.Action; namespace NadekoBot.Modules { internal class Trello : DiscordModule { - private readonly Timer t = new Timer() { Interval = 2000 }; + private readonly Timer t = new Timer { Interval = 2000 }; public override string Prefix { get; } = "trello"; public override void Install(ModuleManager manager) { diff --git a/NadekoBot/NadekoBot.cs b/NadekoBot/NadekoBot.cs index 744df951..bc24c14f 100644 --- a/NadekoBot/NadekoBot.cs +++ b/NadekoBot/NadekoBot.cs @@ -71,6 +71,7 @@ namespace NadekoBot { //create new discord client and log Client = new DiscordClient(new DiscordConfigBuilder() { MessageCacheSize = 10, + ConnectionTimeout = 60000, LogLevel = LogSeverity.Warning, LogHandler = (s, e) => Console.WriteLine($"Severity: {e.Severity}" + @@ -118,7 +119,7 @@ namespace NadekoBot { modules.Add(new Conversations(), "Conversations", ModuleFilter.None); modules.Add(new Gambling(), "Gambling", ModuleFilter.None); modules.Add(new Games(), "Games", ModuleFilter.None); - modules.Add(new Music(), "Music", ModuleFilter.None); + //modules.Add(new Music(), "Music", ModuleFilter.None); modules.Add(new Searches(), "Searches", ModuleFilter.None); modules.Add(new NSFW(), "NSFW", ModuleFilter.None); modules.Add(new ClashOfClans(), "ClashOfClans", ModuleFilter.None); diff --git a/NadekoBot/bin/Debug/data/config_example.json b/NadekoBot/bin/Debug/data/config_example.json index e04fca5e..cca3f3bd 100644 --- a/NadekoBot/bin/Debug/data/config_example.json +++ b/NadekoBot/bin/Debug/data/config_example.json @@ -4,6 +4,18 @@ "IsRotatingStatus": false, "SendPrivateMessageOnMention": false, "RotatingStatuses": [], + "CommandPrefixes": { + "Administration": ".", + "Searches": "~", + "NSFW": "~", + "Conversations": "<@{0}>", + "ClashOfClans": ",", + "Help": "-", + "Music": "!m", + "Trello": "trello", + "Games": ">", + "Gambling": "$" + }, "ServerBlacklist": [], "ChannelBlacklist": [], "UserBlacklist": [