diff --git a/CompatBot/EventHandlers/EmpathySimulationHandler.cs b/CompatBot/EventHandlers/EmpathySimulationHandler.cs index cecb9433..17451b12 100644 --- a/CompatBot/EventHandlers/EmpathySimulationHandler.cs +++ b/CompatBot/EventHandlers/EmpathySimulationHandler.cs @@ -42,8 +42,7 @@ public static async Task OnMessageCreated(MessageCreateEventArgs args) return; var similarList = queue.Where(msg => content.Equals(msg.Content, StringComparison.InvariantCultureIgnoreCase)).ToList(); - var rng = new Random(); - if (similarList.Count > rng.Next(2, 5) && similarList.Select(msg => msg.Author.Id).Distinct().Count() > 2) + if (similarList.Count > 2 && similarList.Select(msg => msg.Author.Id).Distinct().Count() > new Random().Next(2, 5)) { Throttling.Set(args.Channel.Id, similarList, ThrottleDuration); var botMsg = await args.Channel.SendMessageAsync(content.ToLowerInvariant()).ConfigureAwait(false);