@antiraid-ext/utils/builtinsettingsmanager
API reference for @antiraid-ext/utils/builtinsettingsmanager
@antiraid-ext/utils/builtinsettingsmanager
Types
BaseAction
Raw Type
type BaseAction = {
name: string,
value: string,
description: string
}
BuiltinSettingsManager
[[ Manages the builtin settings for the bot in the server ]]
Raw Type
--[[
Manages the builtin settings for the bot in the server
]]
type BuiltinSettingsManager = {
--- Gets the mod logs channel for a specific action.
---
--- @param action string The action to get the mod logs channel for.
--- @return discord.Snowflake? The channel ID of the mod logs channel for the action, or nil if not set.
getModLogsChannel: (action: string) -> discord.Snowflake?,
--- Gets all mod logs channels.
---
--- @return {[string]: discord.Snowflake} A table mapping action names to channel IDs.
getAllModLogsChannels: () -> {
[string]: discord.Snowflake
},
--- Sets the mod logs channel for a specific action.
---
--- @param action string? The action to set the mod logs channel for. If nil, sets the default channel.
--- @param channelId discord.Snowflake The channel ID to set as the mod logs channel.
--- @return nil
setModLogsChannel: (action: string?, channelId: discord.Snowflake) -> nil,
--- Deletes the mod logs channel for a specific action.
---
--- @param action string? The action to delete the mod logs channel for. If nil, deletes the default channel.
--- @return nil
deleteModLogsChannel: (action: string?) -> nil,
-- Base mod sting endpoints
--- Gets the base moderation sting counts for a specific action.
---
--- @param action string The action to get the base moderation sting counts for.
--- @return number? The number of stings for the action, or nil if not set.
getBaseModerationStingCounts: (action: string) -> number?,
--- Gets all base moderation sting counts.
---
--- @return {[string]: number} A table mapping action names to the number of stings.
getAllBaseModerationStingCounts: () -> {
[string]: number
},
--- Sets the base moderation sting counts for a specific action.
---
--- @param action string? The action to set the base moderation sting counts for. If nil, sets the default counts.
--- @param stings number The number of stings to set for the action.
--- @return nil
setBaseModerationStingCounts: (action: string?, stings: number) -> nil,
--- Deletes the base moderation sting counts for a specific action.
---
--- @param action string? The action to delete the base moderation sting counts for. If nil, deletes the default counts.
--- @return nil
deleteBaseModerationStingCounts: (action: string?) -> nil,
-- Actions
--- Gets all mod logs actions.
--- @return {BaseAction} A table of mod logs actions with their names, values, and descriptions
getAllModLogsActions: () -> {BaseAction},
--- Gets all mod actions.
--- @return {BaseAction} A table of mod actions with their names, values,
getAllModActions: () -> {BaseAction}
}
Prop | Type | Description |
---|---|---|
getModLogsChannel | Gets the mod logs channel for a specific action. | |
getAllModLogsChannels | Gets all mod logs channels. | |
setModLogsChannel | Sets the mod logs channel for a specific action. | |
deleteModLogsChannel | Deletes the mod logs channel for a specific action. | |
getBaseModerationStingCounts | Gets the base moderation sting counts for a specific action. | |
getAllBaseModerationStingCounts | Gets all base moderation sting counts. | |
setBaseModerationStingCounts | Sets the base moderation sting counts for a specific action. | |
deleteBaseModerationStingCounts | Deletes the base moderation sting counts for a specific action. | |
getAllModLogsActions | Gets all mod logs actions. | |
getAllModActions | Gets all mod actions. |
Functions
BuiltinSettingsManager
Function Signature
function BuiltinSettingsManager(ctx: Primitives.TemplateContext) -> BuiltinSettingsManager end
Arguments
ctx
Returns
ret1
Last updated on