diff --git a/NadekoBot/Classes/JSONModels/Configuration.cs b/NadekoBot/Classes/JSONModels/Configuration.cs index e4acf120..77129e3b 100644 --- a/NadekoBot/Classes/JSONModels/Configuration.cs +++ b/NadekoBot/Classes/JSONModels/Configuration.cs @@ -9,20 +9,50 @@ namespace NadekoBot.Classes.JSONModels { public bool DontJoinServers { get; set; } = false; public bool ForwardMessages { get; set; } = true; public bool IsRotatingStatus { get; set; } = false; + [JsonIgnore] public List Quotes { get; set; } = new List(); - public HashSet ObservingStreams { get; set; } = new HashSet(); + + public HashSet ObservingStreams { get; set; } = + new HashSet(); + 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() { 105309315895693312, 119174277298782216, 143515953525817344 }; - public string[] DisguiseResponses { get; } = { + public string[] _8BallResponses { get; set; } = + { + "Most definitely yes", + "For sure", + "As I see it, yes", + "My sources say yes", + "Yes", + "Most likely", + "Perhaps", + "Maybe", + "Not sure", + "It is uncertain", + "Ask me again later", + "Don't count on it", + "Probably not", + "Very doubtful", + "Most likely no", + "Nope", + "No", + "My sources say no", + "Dont even think about it", + "Definitely no", + "NO - It may cause disease contraction" + }; + + public string[] DisguiseResponses { get; } = { "https://cdn.discordapp.com/attachments/140007341880901632/156721710458994690/Cc5mixjUYAADgBs.jpg", "https://cdn.discordapp.com/attachments/140007341880901632/156721715831898113/hqdefault.jpg", "https://cdn.discordapp.com/attachments/140007341880901632/156721724430352385/okawari_01_haruka_weird_mask.jpg", diff --git a/NadekoBot/Classes/Trivia/TriviaQuestionPool.cs b/NadekoBot/Classes/Trivia/TriviaQuestionPool.cs index 8d17216b..5733ba2f 100644 --- a/NadekoBot/Classes/Trivia/TriviaQuestionPool.cs +++ b/NadekoBot/Classes/Trivia/TriviaQuestionPool.cs @@ -25,7 +25,7 @@ namespace NadekoBot.Classes.Trivia { } internal void Reload() { - var arr = JArray.Parse(File.ReadAllText("data/questions.txt")); + var arr = JArray.Parse(File.ReadAllText("data/questions.json")); foreach (var item in arr) { var tq = new TriviaQuestion(item["Question"].ToString(), item["Answer"].ToString(), item["Category"]?.ToString()); diff --git a/NadekoBot/Modules/Games.cs b/NadekoBot/Modules/Games.cs index 55fd9d7a..bb229bf5 100644 --- a/NadekoBot/Modules/Games.cs +++ b/NadekoBot/Modules/Games.cs @@ -9,7 +9,6 @@ using NadekoBot.Extensions; namespace NadekoBot.Modules { internal class Games : DiscordModule { - private readonly string[] _8BallAnswers; private readonly Random rng = new Random(); public Games() { @@ -17,7 +16,6 @@ namespace NadekoBot.Modules { commands.Add(new SpeedTyping(this)); commands.Add(new PollCommand(this)); //commands.Add(new BetrayGame(this)); - _8BallAnswers = JArray.Parse(File.ReadAllText("data/8ball.json")).Select(t => t.ToString()).ToArray(); } public override string Prefix { get; } = NadekoBot.Config.CommandPrefixes.Games; @@ -51,7 +49,7 @@ namespace NadekoBot.Modules { return; try { await e.Channel.SendMessage( - $":question: **Question**: `{question}` \n🎱 **8Ball Answers**: `{_8BallAnswers[rng.Next(0, _8BallAnswers.Length)]}`"); + $":question: **Question**: `{question}` \n🎱 **8Ball Answers**: `{NadekoBot.Config._8BallResponses[rng.Next(0, NadekoBot.Config._8BallResponses.Length)]}`"); } catch { } }); diff --git a/NadekoBot/bin/Debug/data/8ball.json b/NadekoBot/bin/Debug/data/8ball.json index a8110e75..e69de29b 100644 --- a/NadekoBot/bin/Debug/data/8ball.json +++ b/NadekoBot/bin/Debug/data/8ball.json @@ -1,23 +0,0 @@ -[ - "Most definitely yes", - "For sure", - "As I see it, yes", - "My sources say yes", - "Yes", - "Most likely", - "Perhaps", - "Maybe", - "Not sure", - "It is uncertain", - "Ask me again later", - "Don't count on it", - "Probably not", - "Very doubtful", - "Most likely no", - "Nope", - "No", - "My sources say no", - "Dont even think about it", - "Definitely no", - "NO - It may cause disease contraction" -] \ No newline at end of file diff --git a/NadekoBot/bin/Debug/data/config_example.json b/NadekoBot/bin/Debug/data/config_example.json index 0b56bae8..bc5845fb 100644 --- a/NadekoBot/bin/Debug/data/config_example.json +++ b/NadekoBot/bin/Debug/data/config_example.json @@ -25,6 +25,29 @@ 119174277298782216, 143515953525817344 ], + "_8BallResponses": [ + "Most definitely yes", + "For sure", + "As I see it, yes", + "My sources say yes", + "Yes", + "Most likely", + "Perhaps", + "Maybe", + "Not sure", + "It is uncertain", + "Ask me again later", + "Don't count on it", + "Probably not", + "Very doubtful", + "Most likely no", + "Nope", + "No", + "My sources say no", + "Dont even think about it", + "Definitely no", + "NO - It may cause disease contraction" + ], "DisguiseResponses": [ "https://cdn.discordapp.com/attachments/140007341880901632/156721710458994690/Cc5mixjUYAADgBs.jpg", "https://cdn.discordapp.com/attachments/140007341880901632/156721715831898113/hqdefault.jpg", diff --git a/NadekoBot/bin/Debug/data/questions.txt b/NadekoBot/bin/Debug/data/questions.json similarity index 100% rename from NadekoBot/bin/Debug/data/questions.txt rename to NadekoBot/bin/Debug/data/questions.json