GuildAutoMod
Classes
Section titled “Classes”- GuildAutoMod ⇐
Base Represents an auto-mod configuration for a guild.
Functions
Section titled “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
Section titled “GuildAutoMod ⇐ Base”Represents an auto-mod configuration for a guild.
Kind: global class
Extends: Base
- GuildAutoMod ⇐
Base- new GuildAutoMod(data, guildId, client)
- .guild :
Guild - .creator :
User - .fetch([options]) ⇒
Promise.<GuildAutoMod> - .edit([options]) ⇒
Promise.<GuildAutoMod> - .delete([reason]) ⇒
Promise.<void> - .setName(name, [reason]) ⇒
Promise.<GuildAutoMod> - .setEventType(eventType, [reason]) ⇒
Promise.<GuildAutoMod> - .setTriggerMetadata(triggerMetadata, [reason]) ⇒
Promise.<GuildAutoMod> - .setActions(actions, [reason]) ⇒
Promise.<GuildAutoMod>
new GuildAutoMod(data, guildId, client)
Section titled “new GuildAutoMod(data, guildId, client)”| Param | Type | Description |
|---|---|---|
| data | Object | The data for the auto-mod configuration |
| guildId | Snowflake | The ID of the guild the auto-mod is for |
| client | Client | The client instance |
guildAutoMod.guild : Guild
Section titled “guildAutoMod.guild : Guild”The guild associated with this GuildAutoMod.
Kind: instance property of GuildAutoMod
Read only: true
guildAutoMod.creator : User
Section titled “guildAutoMod.creator : User”The user who created this GuildAutoMod.
Kind: instance property of GuildAutoMod
Read only: true
guildAutoMod.fetch([options]) ⇒ Promise.<GuildAutoMod>
Section titled “guildAutoMod.fetch([options]) ⇒ Promise.<GuildAutoMod>”Fetches the GuildAutoMod’s data from Discord.
Kind: instance method of GuildAutoMod
| Param | Type | Description |
|---|---|---|
| [options] | Object | Additional options for the API request. |
guildAutoMod.edit([options]) ⇒ Promise.<GuildAutoMod>
Section titled “guildAutoMod.edit([options]) ⇒ Promise.<GuildAutoMod>”Edits the GuildAutoMod.
Kind: instance method of GuildAutoMod
| Param | Type | Description |
|---|---|---|
| [options] | Object | The options to edit the GuildAutoMod with. |
guildAutoMod.delete([reason]) ⇒ Promise.<void>
Section titled “guildAutoMod.delete([reason]) ⇒ Promise.<void>”Deletes the GuildAutoMod.
Kind: instance method of GuildAutoMod
| Param | Type | Description |
|---|---|---|
| [reason] | string | Reason for deleting the GuildAutoMod. |
guildAutoMod.setName(name, [reason]) ⇒ Promise.<GuildAutoMod>
Section titled “guildAutoMod.setName(name, [reason]) ⇒ Promise.<GuildAutoMod>”Sets the name of the GuildAutoMod.
Kind: instance method of GuildAutoMod
| Param | Type | Description |
|---|---|---|
| name | string | The new name for the GuildAutoMod. |
| [reason] | string | Reason for changing the name. |
guildAutoMod.setEventType(eventType, [reason]) ⇒ Promise.<GuildAutoMod>
Section titled “guildAutoMod.setEventType(eventType, [reason]) ⇒ Promise.<GuildAutoMod>”Sets the event type of the GuildAutoMod.
Kind: instance method of GuildAutoMod
| Param | Type | Description |
|---|---|---|
| eventType | string | number | The new event type for the GuildAutoMod. |
| [reason] | string | Reason for changing the event type. |
guildAutoMod.setTriggerMetadata(triggerMetadata, [reason]) ⇒ Promise.<GuildAutoMod>
Section titled “guildAutoMod.setTriggerMetadata(triggerMetadata, [reason]) ⇒ Promise.<GuildAutoMod>”Sets the trigger metadata of the GuildAutoMod.
Kind: instance method of GuildAutoMod
| Param | Type | Description |
|---|---|---|
| triggerMetadata | Object | The new trigger metadata for the GuildAutoMod. |
| triggerMetadata.keywordFilter | Array.<string> | The keyword filter to apply. |
| triggerMetadata.presets | Array.<string> | Array.<number> | The presets to apply. |
| triggerMetadata.allowList | Array.<string> | The allow list to apply. |
| [reason] | string | Reason for changing the trigger metadata. |
guildAutoMod.setActions(actions, [reason]) ⇒ Promise.<GuildAutoMod>
Section titled “guildAutoMod.setActions(actions, [reason]) ⇒ Promise.<GuildAutoMod>”Sets the actions of the GuildAutoMod.
Kind: instance method of GuildAutoMod
| Param | Type | Description |
|---|---|---|
| actions | Array.<Object> | The new actions for the GuildAutoMod. |
| [reason] | string | Reason for changing the actions. |
setEnabled(enabled, reason) ⇒ Promise
Section titled “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.
| Param | Type | Description |
|---|---|---|
| enabled | boolean | Indicates whether the feature should be enabled or disabled. |
| reason | string | The reason for enabling or disabling the feature. |
setExemptRoles(exemptRoles, reason) ⇒ Promise
Section titled “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.
| Param | Type | Description |
|---|---|---|
| exemptRoles | Array.<string> | An array of role IDs that should be exempt from the feature. |
| reason | string | The reason for setting the exempt roles. |
setExemptChannels(exemptChannels, reason) ⇒ Promise
Section titled “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.
| Param | Type | Description |
|---|---|---|
| exemptChannels | Array.<string> | An array of channel IDs that should be exempt from the feature. |
| reason | string | The reason for setting the exempt channels. |