示例#1
0
 static void Randomizator()
 {
     while (true)
     {
         if (ChatIDs.Count != 0)
         {
             var randomChat = ChatIDs[Random.Next(0, ChatIDs.Count)];
             if (Random.Next(1, 200) == 74)
             {
                 BotLogic.RandomAction(randomChat);
             }
             Thread.Sleep(10000);
         }
     }
 }
示例#2
0
 public static void DoSomething()
 {
     // todo Strategy pattern or Delegat`s
     if (Message.Equals("/joke") || Message.Equals("/joke@funny_luckybot"))
     {
         BotLogic.Joke();
     }
     else if (Message.Equals("/pic") || Message.Equals("/pic@funny_luckybot"))
     {
         BotLogic.Pic();
     }
     else if (Message.Equals("/founddog") || Message.Equals("/founddog@funny_luckybot"))
     {
         BotLogic.FoundDog(Users[ChatId]);
     }
     else if (Message.Equals("/dogstats") || Message.Equals("/dogstats@funny_luckybot"))
     {
         BotLogic.DogsStatsForToday();
     }
     else if (Message.Equals("/currency") || Message.Equals("/currency@funny_luckybot"))
     {
         BotLogic.Currency();
     }
     else if (Message.StartsWith("/addrandom "))
     {
         BotLogic.AddRandom();
     }
     else if (Message.StartsWith("/addaggresion "))
     {
         BotLogic.AddAggresion();
     }
     else if (Message.StartsWith("/agr"))
     {
         BotLogic.Agr();
     }
     else if (Random.Next(1, Agressor) == 2)
     {
         BotLogic.RandomAggression(UserId.Username);
     }
 }