DiscordAutomoderationRule
The DiscordAutomoderationRule
class provides methods to interact with Discord auto-moderation rules, including modifying and deleting rules.
Properties
id
DiscordAutomoderationRule.id :: string
guildId
DiscordAutomoderationRule.guildId :: string
name
DiscordAutomoderationRule.name :: string
eventType
DiscordAutomoderationRule.eventType :: number
triggerType
DiscordAutomoderationRule.triggerType :: number
enabled
DiscordAutomoderationRule.enabled :: boolean
exemptRoles
exemptChannels
triggerMetadata
DiscordAutomoderationRule.triggerMetadata :: {
{ keywordFilter: { string } }
{ keywordFilter: { string } }
actions
DiscordAutomoderationRule.actions :: {
type: number,
metadata: { channelId,
durationSeconds: number,
customMessage: string?,
}
type: number,
metadata: { channelId,
durationSeconds: number,
customMessage: string?,
}
Methods
modifyAsync
DiscordAutomoderationRule : modifyAsync () -> Vendor.Future<CommandResponse>
moderationRoleBuilder: DiscordAutomoderationRule.DiscordAutomoderationRule The builder for the modified rule.
Modifies an existing auto-moderation rule.
deleteAsync
Deletes an existing auto-moderation rule.
Functions
new
DiscordAutomoderationRule . new () -> ()
discordClient: any The Discord client instance.
automoderationData: table The data for the auto-moderation rule.
Creates a new instance of the DiscordAutomoderationRule.