From 87c746db9c529f7207827ccf718fb651b4be5caf Mon Sep 17 00:00:00 2001 From: Misha133 Date: Thu, 2 Feb 2023 16:30:20 +0300 Subject: [PATCH] public automod rules collection in a socketgulild --- src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs b/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs index 3ea7ff41d..3fdb5ff38 100644 --- a/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs +++ b/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs @@ -1874,6 +1874,14 @@ namespace Discord.WebSocket return AddOrUpdateAutoModRule(rule); } + /// + /// Gets the auto moderation rules defined in this guild. + /// + /// + /// This property may not always return all auto moderation rules if they haven't been cached. + /// + public IReadOnlyCollection AutoModRules => _automodRules.ToReadOnlyCollection(); + #endregion #region IGuild