Пример #1
0
 private static void InitReplies()
 {
     try
     {
         replyModule = new ReplyModule(location.GetLocation(ReplyModule.Filename));
         Log.Info(replyModule.ToString());
     }
     catch (Exception ex)
     {
         Log.Error(ex.ToString());
     }
 }
Пример #2
0
 internal static void TestReply()
 {
     using (ReplyModule replyModule = new ReplyModule(location.GetLocation(ReplyModule.Filename)))
     {
         replyModule.Config.Settings.AntiHammerSeconds = 0;
         replyModule.Config.Settings.NoReplyChance     = 0;
         //     replyModule.config.Settings.ALLCAPSRepeatChance = 7;
         Console.WriteLine(replyModule);
         foreach (string sentence in new TestData())
         {
             List <OutgoingMsg> Msgs = new List <OutgoingMsg>();
             var reply = replyModule.GenerateReply(commonModule, sentence, Msgs);
             System.Console.WriteLine($"\nIn: {sentence}: Status: {reply}");
             Msgs.ForEach(m => System.Console.WriteLine("   OUT: " + m));
             System.Console.WriteLine(" -------------------------- ");
         }
     }
 }