export class AutoModerationRuleManager extends CachedManager<Snowflake, AutoModerationRule, AutoModerationRuleResolvable>
Manages API methods for auto moderation rules and stores their cache.
readonlyCollection<Key, Holds> cache :
The cache of items for this manager.
Inherited from: DataManager
Guild guild :
The guild this manager belongs to.
readonlyConstructable<Holds> holds :
The data structure belonging to this manager.
Inherited from: DataManager
createoptions: AutoModerationRuleCreateOptions) : Promise<AutoModerationRule> (
options: AutoModerationRuleCreateOptions
Creates a new auto moderation rule.
deleteautoModerationRule: AutoModerationRuleResolvablereason?: string) : Promise<void> (
autoModerationRule: AutoModerationRuleResolvable
reason?: string
Deletes an auto moderation rule.
editautoModerationRule: AutoModerationRuleResolvableoptions: AutoModerationRuleEditOptions) : Promise<AutoModerationRule> (
autoModerationRule: AutoModerationRuleResolvable
options: AutoModerationRuleEditOptions
Edits an auto moderation rule.
Overload 1
Overload 2
fetch) : Promise<AutoModerationRule> (
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)
resolveautoModerationRule: AutoModerationRuleResolvable) : AutoModerationRule (
autoModerationRule: AutoModerationRuleResolvable
Resolves an AutoModerationRuleResolvable to an AutoModerationRule object.
resolveIdautoModerationRule: AutoModerationRuleResolvable) : Snowflake (
autoModerationRule: AutoModerationRuleResolvable
Resolves an AutoModerationRuleResolvable to a AutoModerationRule id.
valueOfCollection<Key, Holds> () :
Inherited from: DataManager