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
guildIdulongThe id of the guild where the rule will be modified.
ruleIdulongThe id of the rule that will be modified.
nameOptional<string>The rule name.
eventTypeOptional<DiscordRuleEventType>The Discord event that will trigger the rule.
triggerMetadataOptional<DiscordRuleTriggerMetadata>The trigger metadata.
actionsOptional<IReadOnlyList<DiscordAutoModerationAction>>The actions that will run when a rule is triggered.
enabledOptional<bool>Whenever the rule is enabled or not.
exemptRolesOptional<IReadOnlyList<DiscordRole>>The exempted roles that will not trigger the rule.
exemptChannelsOptional<IReadOnlyList<DiscordChannel>>The exempted channels that will not trigger the rule.
reasonstringThe reason for audits logs.
Returns
- ValueTask<DiscordAutoModerationRule>
The modified rule.