public void SendMessage(ZenBotMessage message) { if (SentMessages.Contains(message)) { message.Message = LoopBreaker.GetRandomMessage(); } SentMessages.Add(message); var answer = Connection.SendMessage(message.Message).Result; ReceivedAnswers.Add(new ZenBotMessage() { Message = answer }); if (ReceivedAnswers.Count > QueueSize) { ReceivedAnswers.RemoveAt(0); } if (SentMessages.Count > QueueSize) { SentMessages.RemoveAt(0); } }