- Possible fix for .repeat bug

- Slight adjustment for repeater logic
  - Timer should no longer increase on some repeaters
  - Repeaters should no longer have periods when they're missing from the list
This commit is contained in:
Kwoth
2021-09-15 23:18:08 +02:00
parent ed039977c2
commit d2d0cb9e03
4 changed files with 40 additions and 11 deletions

View File

@@ -92,5 +92,15 @@ namespace NadekoBot.Modules.Utility.Services
var initialIntervalMultiplier = 1 - (triggerCount - Math.Truncate(triggerCount));
return DateTime.UtcNow + (Repeater.Interval * initialIntervalMultiplier);
}
public override bool Equals(object? obj)
{
return obj is RunningRepeater rr && rr.Repeater.Id == this.Repeater.Id;
}
public override int GetHashCode()
{
return this.Repeater.Id;
}
}
}