Method ModifyGuildAutoModerationRuleAsync
- Namespace
- DSharpPlus.Net
- Assembly
- DSharpPlus.dll
ModifyGuildAutoModerationRuleAsync(ulong, ulong, Optional<string>, Optional<DiscordRuleEventType>, Optional<DiscordRuleTriggerMetadata>, Optional<IReadOnlyList<DiscordAutoModerationAction>>, Optional<bool>, Optional<IReadOnlyList<DiscordRole>>, Optional<IReadOnlyList<DiscordChannel>>, string?)
Internal method to modify an auto-moderation rule in a guild.
public ValueTask<DiscordAutoModerationRule> ModifyGuildAutoModerationRuleAsync(ulong guildId, ulong ruleId, Optional<string> name, Optional<DiscordRuleEventType> eventType, Optional<DiscordRuleTriggerMetadata> triggerMetadata, Optional<IReadOnlyList<DiscordAutoModerationAction>> actions, Optional<bool> enabled, Optional<IReadOnlyList<DiscordRole>> exemptRoles, Optional<IReadOnlyList<DiscordChannel>> exemptChannels, string? reason = null)
Parameters
guildId
ulongThe id of the guild where the rule will be modified.
ruleId
ulongThe id of the rule that will be modified.
name
Optional<string>The rule name.
eventType
Optional<DiscordRuleEventType>The Discord event that will trigger the rule.
triggerMetadata
Optional<DiscordRuleTriggerMetadata>The trigger metadata.
actions
Optional<IReadOnlyList<DiscordAutoModerationAction>>The actions that will run when a rule is triggered.
enabled
Optional<bool>Whenever the rule is enabled or not.
exemptRoles
Optional<IReadOnlyList<DiscordRole>>The exempted roles that will not trigger the rule.
exemptChannels
Optional<IReadOnlyList<DiscordChannel>>The exempted channels that will not trigger the rule.
reason
stringThe reason for audits logs.
Returns
- ValueTask<DiscordAutoModerationRule>
The modified rule.