using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using Sony.ChartBot.Entities.MessengerApi; namespace Sony.ChartBot.Messages.Helpers { public class CourtesyInputHelper { private static readonly IEnumerable CourtesyWords = new[] { "hi", "hello", "bye", "goodbye", "thanks", "thank you", "great", "ok" }; public bool IsCourtesyInput(MessagingData data) { var cleanedInput = Regex.Replace(data.message.text, @"\W+", string.Empty); return CourtesyWords.Contains(cleanedInput.ToLowerInvariant()); } } }