Skip to content

GuildAutoMod

Classes

GuildAutoModBase

Represents an auto-mod configuration for a guild.

Functions

setEnabled(enabled, reason)Promise

Enables or disables the feature.

setExemptRoles(exemptRoles, reason)Promise

Sets the roles that are exempt from the feature.

setExemptChannels(exemptChannels, reason)Promise

Sets the channels that are exempt from the feature.

GuildAutoMod ⇐ Base

Represents an auto-mod configuration for a guild.

Kind: global class
Extends: Base

new GuildAutoMod(data, guildId, client)

ParamTypeDescription
dataObjectThe data for the auto-mod configuration
guildIdSnowflakeThe ID of the guild the auto-mod is for
clientClientThe client instance

guildAutoMod.guild : Guild

The guild associated with this GuildAutoMod.

Kind: instance property of GuildAutoMod
Read only: true

guildAutoMod.creator : User

The user who created this GuildAutoMod.

Kind: instance property of GuildAutoMod
Read only: true

guildAutoMod.fetch([options]) ⇒ Promise.<GuildAutoMod>

Fetches the GuildAutoMod’s data from Discord.

Kind: instance method of GuildAutoMod

ParamTypeDescription
[options]ObjectAdditional options for the API request.

guildAutoMod.edit([options]) ⇒ Promise.<GuildAutoMod>

Edits the GuildAutoMod.

Kind: instance method of GuildAutoMod

ParamTypeDescription
[options]ObjectThe options to edit the GuildAutoMod with.

guildAutoMod.delete([reason]) ⇒ Promise.<void>

Deletes the GuildAutoMod.

Kind: instance method of GuildAutoMod

ParamTypeDescription
[reason]stringReason for deleting the GuildAutoMod.

guildAutoMod.setName(name, [reason]) ⇒ Promise.<GuildAutoMod>

Sets the name of the GuildAutoMod.

Kind: instance method of GuildAutoMod

ParamTypeDescription
namestringThe new name for the GuildAutoMod.
[reason]stringReason for changing the name.

guildAutoMod.setEventType(eventType, [reason]) ⇒ Promise.<GuildAutoMod>

Sets the event type of the GuildAutoMod.

Kind: instance method of GuildAutoMod

ParamTypeDescription
eventTypestring | numberThe new event type for the GuildAutoMod.
[reason]stringReason for changing the event type.

guildAutoMod.setTriggerMetadata(triggerMetadata, [reason]) ⇒ Promise.<GuildAutoMod>

Sets the trigger metadata of the GuildAutoMod.

Kind: instance method of GuildAutoMod

ParamTypeDescription
triggerMetadataObjectThe new trigger metadata for the GuildAutoMod.
triggerMetadata.keywordFilterArray.<string>The keyword filter to apply.
triggerMetadata.presetsArray.<string> | Array.<number>The presets to apply.
triggerMetadata.allowListArray.<string>The allow list to apply.
[reason]stringReason for changing the trigger metadata.

guildAutoMod.setActions(actions, [reason]) ⇒ Promise.<GuildAutoMod>

Sets the actions of the GuildAutoMod.

Kind: instance method of GuildAutoMod

ParamTypeDescription
actionsArray.<Object>The new actions for the GuildAutoMod.
[reason]stringReason for changing the actions.

setEnabled(enabled, reason) ⇒ Promise

Enables or disables the feature.

Kind: global function
Returns: Promise - A promise that resolves with the result of the edit operation.

ParamTypeDescription
enabledbooleanIndicates whether the feature should be enabled or disabled.
reasonstringThe reason for enabling or disabling the feature.

setExemptRoles(exemptRoles, reason) ⇒ Promise

Sets the roles that are exempt from the feature.

Kind: global function
Returns: Promise - A promise that resolves with the result of the edit operation.

ParamTypeDescription
exemptRolesArray.<string>An array of role IDs that should be exempt from the feature.
reasonstringThe reason for setting the exempt roles.

setExemptChannels(exemptChannels, reason) ⇒ Promise

Sets the channels that are exempt from the feature.

Kind: global function
Returns: Promise - A promise that resolves with the result of the edit operation.

ParamTypeDescription
exemptChannelsArray.<string>An array of channel IDs that should be exempt from the feature.
reasonstringThe reason for setting the exempt channels.