diff --git a/Zhongli.Bot/Modules/GeneralModule.cs b/Zhongli.Bot/Modules/GeneralModule.cs index 6498924..8c04936 100644 --- a/Zhongli.Bot/Modules/GeneralModule.cs +++ b/Zhongli.Bot/Modules/GeneralModule.cs @@ -2,7 +2,6 @@ using System.Threading.Tasks; using Discord; using Discord.Commands; -using Discord.WebSocket; using Humanizer; using Zhongli.Services.Core.Preconditions.Commands; using Zhongli.Services.Evaluation; diff --git a/Zhongli.Services/Moderation/ModerationActionExtensions.cs b/Zhongli.Services/Moderation/ModerationActionExtensions.cs index fa07c7b..4d38d4c 100644 --- a/Zhongli.Services/Moderation/ModerationActionExtensions.cs +++ b/Zhongli.Services/Moderation/ModerationActionExtensions.cs @@ -1,7 +1,7 @@ using Discord; using Zhongli.Data.Models.Discord; using Zhongli.Data.Models.Moderation.Infractions; -using static Zhongli.Services.Utilities.DateTimeExtensions; +using Zhongli.Services.Utilities; namespace Zhongli.Services.Moderation; diff --git a/Zhongli.Services/Moderation/ModerationService.cs b/Zhongli.Services/Moderation/ModerationService.cs index da58973..d644b7d 100644 --- a/Zhongli.Services/Moderation/ModerationService.cs +++ b/Zhongli.Services/Moderation/ModerationService.cs @@ -6,7 +6,6 @@ using Discord; using Discord.Net; using Discord.WebSocket; -using Hangfire; using Zhongli.Data; using Zhongli.Data.Models.Discord; using Zhongli.Data.Models.Moderation.Infractions; @@ -366,7 +365,7 @@ private async Task ExpireReprimandAsync(ExpirableReprimand reprimand, ReprimandS details = new ReprimandDetails(user, guild.CurrentUser, $"[Reprimand {status}]"); } - reprimand.EndedAt ??= DateTimeOffset.UtcNow; + reprimand.EndedAt ??= DateTimeOffset.UtcNow; await UpdateReprimandAsync(reprimand, status, details, cancellationToken); } diff --git a/Zhongli.Services/Utilities/NotificationContext.cs b/Zhongli.Services/Utilities/NotificationContext.cs deleted file mode 100644 index be425ae..0000000 --- a/Zhongli.Services/Utilities/NotificationContext.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Discord.Commands; -using MediatR; - -namespace Zhongli.Services.Utilities; - -public class NotificationContext : INotification -{ - public NotificationContext(T message, ICommandContext context) - { - Message = message; - Context = context; - } - - public ICommandContext Context { get; } - - public T Message { get; } -} \ No newline at end of file diff --git a/Zhongli.Services/Utilities/SequenceEqualityComparer.cs b/Zhongli.Services/Utilities/SequenceEqualityComparer.cs deleted file mode 100644 index 0d26748..0000000 --- a/Zhongli.Services/Utilities/SequenceEqualityComparer.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Zhongli.Services.Utilities; - -public class SequenceEqualityComparer : IEqualityComparer> -{ - public bool Equals(IReadOnlyCollection? x, IReadOnlyCollection? y) - => x is not null && y is not null && x.SequenceEqual(y); - - public int GetHashCode(IReadOnlyCollection obj) - { - var hashCode = new HashCode(); - - foreach (var item in obj) - { - hashCode.Add(item); - } - - return hashCode.ToHashCode(); - } -} \ No newline at end of file