Preview deployment
export class AutoModerationRuleManager extends CachedManager<Snowflake, AutoModerationRule, AutoModerationRuleResolvable>

Manages API methods for auto moderation rules and stores their cache.

readonly
cache : Collection<Key, Holds>

The cache of items for this manager.

Inherited from: DataManager

readonly
client : Client

The client that instantiated this Manager

Inherited from: BaseManager

guild : Guild

The guild this manager belongs to.

readonly
holds : Constructable<Holds>

The data structure belonging to this manager.

Inherited from: DataManager

Creates a new auto moderation rule.

delete(
autoModerationRule: AutoModerationRuleResolvable
reason?: string
) : Promise<void>

Deletes an auto moderation rule.

Edits an auto moderation rule.

Fetches auto moderation rules from Discord.

Examples:
// Fetch all auto moderation rules from a guild without caching
guild.autoModerationRules.fetch({ cache: false })
  .then(console.log)
  .catch(console.error);
// Fetch a single auto moderation rule
guild.autoModerationRules.fetch('979083472868098119')
  .then(console.log)
  .catch(console.error);
// Fetch a single auto moderation rule without checking cache and without caching
guild.autoModerationRules.fetch({ autoModerationRule: '979083472868098119', cache: false, force: true })
  .then(console.log)
  .catch(console.error)

resolveId(
autoModerationRule: AutoModerationRuleResolvable
) : Snowflake | null

Resolves an AutoModerationRuleResolvable to a AutoModerationRule id.

valueOf() : Collection<Key, Holds>

Inherited from: DataManager