class AutoModerationRuleManager

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

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

The cache of this manager

readonly
client : Client

The client that instantiated this Manager

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

Resolves an AutoModerationRuleResolvable to a AutoModerationRule id.

valueOf() : Collection<Key, Holds>

Inherited from: DataManager