commands

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCommandAllowedToRun

func CheckCommandAllowedToRun(cmd *cobra.Command, channels configurator.ConfiguratorChannel, channelID types.DiscordChannelID) bool

func CreateConsoler

func CreateConsoler(
	channelInfo *consoler_types.ChannelParams,
	configur *configurator.Configurator,
) *cobra.Command

func GetStatus

func GetStatus[T any](r ConfStatus[T], channelID types.DiscordChannelID) string

func NewAlertThresholdCommands

func NewAlertThresholdCommands[T configurator.AlertThresholdType](
	cmdGroup *cmdgroup.CmdGroup,
	cfgTags configurator.IConfiguratorAlertThreshold[T],
	channels configurator.ConfiguratorChannel,
) *alertThresholdCommands[T]

func NewTagCommands

func NewTagCommands(cmd *cmdgroup.CmdGroup, cfgTags configurator.IConfiguratorTags, channels configurator.ConfiguratorChannel) *tagCommands

func PrintList added in v1.6.2

func PrintList[T any](smth []T) string

Types

type AlertBoolCommands

type AlertBoolCommands[T configurator.AlertBoolType] struct {
	*cmdgroup.CmdGroup
	// contains filtered or unexported fields
}

func (*AlertBoolCommands[T]) CreateDisableCmd

func (t *AlertBoolCommands[T]) CreateDisableCmd()

func (*AlertBoolCommands[T]) CreateEnableCmd

func (t *AlertBoolCommands[T]) CreateEnableCmd()

func (*AlertBoolCommands[T]) CreateStatusCmd

func (t *AlertBoolCommands[T]) CreateStatusCmd()

type AlertSetStringCommand

type AlertSetStringCommand[T configurator.AlertStringType] struct {
	*cmdgroup.CmdGroup
	// contains filtered or unexported fields
}

func NewAlertSetStringCommand

func NewAlertSetStringCommand[T configurator.AlertStringType](
	cmdGroup *cmdgroup.CmdGroup,
	cfgTags configurator.IConfiguratorAlertString[T],
	channels configurator.ConfiguratorChannel,
	allowed_order_keys []types.OrderKey,
) *AlertSetStringCommand[T]

func (*AlertSetStringCommand[T]) CreateSetCmd

func (t *AlertSetStringCommand[T]) CreateSetCmd(allowed_order_keys []types.OrderKey)

func (*AlertSetStringCommand[T]) CreateStatusCmd

func (t *AlertSetStringCommand[T]) CreateStatusCmd()

func (*AlertSetStringCommand[T]) CreateUnsetCmd

func (t *AlertSetStringCommand[T]) CreateUnsetCmd()

type ConfStatus

type ConfStatus[T any] interface {
	Status(channelID types.DiscordChannelID) (T, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL