Skip to content

Commit

Permalink
Merge pull request #425 from JohnHolmesII/patch-2
Browse files Browse the repository at this point in the history
Update EmpathySimulationHandler.cs
  • Loading branch information
13xforever authored Oct 11, 2019
2 parents 67439ed + dc82982 commit bfbad71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CompatBot/EventHandlers/EmpathySimulationHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static async Task OnMessageCreated(MessageCreateEventArgs args)
return;

var similarList = queue.Where(msg => content.Equals(msg.Content, StringComparison.InvariantCultureIgnoreCase)).ToList();
if (similarList.Count > 2 && 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);
Expand Down

0 comments on commit bfbad71

Please sign in to comment.