1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-05-01 19:49:55 +03:00

Use DateTimeOffset#UtcNow instead of DateTimeOffset#Now (UtcNow is actually faster lol)

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
Octol1ttle 2023-04-27 22:14:30 +05:00
parent 41958deb0a
commit cdfa0e11f7
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
8 changed files with 28 additions and 21 deletions

View file

@ -79,7 +79,7 @@ public record GuildData {
foreach (var member in guild.Users) {
if (MemberData.TryGetValue(member.Id, out var memberData)) {
if (!memberData.IsInGuild
&& DateTimeOffset.Now.ToUnixTimeSeconds()
&& DateTimeOffset.UtcNow.ToUnixTimeSeconds()
- Math.Max(
memberData.LeftAt.Last().ToUnixTimeSeconds(),
memberData.BannedUntil?.ToUnixTimeSeconds() ?? 0)