diff --git a/Boyfriend/EventHandler.cs b/Boyfriend/EventHandler.cs index 3f89d7c..a7a4e9f 100644 --- a/Boyfriend/EventHandler.cs +++ b/Boyfriend/EventHandler.cs @@ -1,4 +1,5 @@ -using Discord; +using System.Diagnostics.CodeAnalysis; +using Discord; using Discord.Rest; using Discord.WebSocket; @@ -8,16 +9,17 @@ public static class EventHandler { private static readonly DiscordSocketClient Client = Boyfriend.Client; private static bool _sendReadyMessages = true; + [SuppressMessage("ReSharper", "ConvertClosureToMethodGroup")] public static void InitEvents() { - Client.Ready += ReadyEvent; - Client.MessageDeleted += MessageDeletedEvent; - Client.MessageReceived += MessageReceivedEvent; - Client.MessageUpdated += MessageUpdatedEvent; - Client.UserJoined += UserJoinedEvent; - Client.GuildScheduledEventCreated += ScheduledEventCreatedEvent; - Client.GuildScheduledEventCancelled += ScheduledEventCancelledEvent; - Client.GuildScheduledEventStarted += ScheduledEventStartedEvent; - Client.GuildScheduledEventCompleted += ScheduledEventCompletedEvent; + Client.Ready += () => ReadyEvent(); + Client.MessageDeleted += (x, y) => MessageDeletedEvent(x, y); + Client.MessageReceived += x => MessageReceivedEvent(x); + Client.MessageUpdated += (x, y, z) => MessageUpdatedEvent(x, y, z); + Client.UserJoined += x => UserJoinedEvent(x); + Client.GuildScheduledEventCreated += x => ScheduledEventCreatedEvent(x); + Client.GuildScheduledEventCancelled += x => ScheduledEventCancelledEvent(x); + Client.GuildScheduledEventStarted += x => ScheduledEventStartedEvent(x); + Client.GuildScheduledEventCompleted += x => ScheduledEventCompletedEvent(x); } private static Task ReadyEvent() {