From 8b6be640c7b1d8bb6879fed50405b51106530b6c Mon Sep 17 00:00:00 2001 From: Mihail Gribkov <61027276+Misha-133@users.noreply.github.com> Date: Mon, 15 Jul 2024 11:02:04 +0300 Subject: [PATCH] Fix automod related events in the sharded client --- src/Discord.Net.WebSocket/DiscordShardedClient.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Discord.Net.WebSocket/DiscordShardedClient.cs b/src/Discord.Net.WebSocket/DiscordShardedClient.cs index 1ed22869c7..b446a06689 100644 --- a/src/Discord.Net.WebSocket/DiscordShardedClient.cs +++ b/src/Discord.Net.WebSocket/DiscordShardedClient.cs @@ -515,6 +515,11 @@ private void RegisterEvents(DiscordSocketClient client, bool isPrimary) client.GuildScheduledEventUserAdd += (arg1, arg2) => _guildScheduledEventUserAdd.InvokeAsync(arg1, arg2); client.GuildScheduledEventUserRemove += (arg1, arg2) => _guildScheduledEventUserRemove.InvokeAsync(arg1, arg2); + client.AutoModActionExecuted += (guild, action, arg3) => _autoModActionExecuted.InvokeAsync(guild, action, arg3); + client.AutoModRuleCreated += rule => client._autoModRuleCreated.InvokeAsync(rule); + client.AutoModRuleDeleted += rule => client._autoModRuleDeleted.InvokeAsync(rule); + client.AutoModRuleUpdated += (arg1, arg2) => client._autoModRuleUpdated.InvokeAsync(arg1, arg2); + client.WebhooksUpdated += (arg1, arg2) => _webhooksUpdated.InvokeAsync(arg1, arg2); client.AuditLogCreated += (arg1, arg2) => _auditLogCreated.InvokeAsync(arg1, arg2);