LogoAntiRaid

@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
}
PropTypeDescription
name
-
value
-
description
-

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}
}
PropTypeDescription
getModLogsChannel
(action: string) -> discord.Snowflake?
Gets the mod logs channel for a specific action.
getAllModLogsChannels
() -> {[string]: discord.Snowflake}
Gets all mod logs channels.
setModLogsChannel
(action: string?, channelId: discord.Snowflake) -> nil
Sets the mod logs channel for a specific action.
deleteModLogsChannel
(action: string?) -> nil
Deletes the mod logs channel for a specific action.
getBaseModerationStingCounts
(action: string) -> number?
Gets the base moderation sting counts for a specific action.
getAllBaseModerationStingCounts
() -> {[string]: number}
Gets all base moderation sting counts.
setBaseModerationStingCounts
(action: string?, stings: number) -> nil
Sets the base moderation sting counts for a specific action.
deleteBaseModerationStingCounts
(action: string?) -> nil
Deletes the base moderation sting counts for a specific action.
getAllModLogsActions
() -> {BaseAction}
Gets all mod logs actions.
getAllModActions
() -> {BaseAction}
Gets all mod actions.

Functions

BuiltinSettingsManager

Function Signature
function BuiltinSettingsManager(ctx: Primitives.TemplateContext) -> BuiltinSettingsManager end

Arguments

ctx

Primitives.TemplateContext

Returns

ret1

BuiltinSettingsManager

Last updated on