reaction

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: GPL-3.0 Imports: 21 Imported by: 0

README

Reaction

Commands to set a reaction, or unset a reaction. Reactions allow the operator to automate commands in response to event(s).

Documentation

Index

Constants

View Source
const (
	ReactionFileName = "reactions.json"
)

Variables

View Source
var ErrNonReactableEvent = errors.New("non-reactable event type")

ErrNonReactableEvent - Event does not exist or is not supported by reactions.

Functions

func Commands

func Commands(con *console.SliverClient) []*cobra.Command

Commands returns the “ command and its subcommands.

func EventTypeToTitle

func EventTypeToTitle(eventType string) string

EventTypeToTitle - Convert an eventType to a more human friendly string.

func GetReactionFilePath

func GetReactionFilePath() string

GetReactionFilePath - Get the.

func LoadReactions

func LoadReactions() (int, error)

LoadReactions - Save the reactions to the reaction file.

func ReactionCmd

func ReactionCmd(cmd *cobra.Command, con *console.SliverClient, args []string)

ReactionCmd - Manage reactions to events.

func ReactionIDCompleter

func ReactionIDCompleter(_ *console.SliverClient) carapace.Action

ReactionIDCompleter completes saved/available reaction IDs.

func ReactionReloadCmd

func ReactionReloadCmd(cmd *cobra.Command, con *console.SliverClient, args []string)

ReactionSaveCmd - Manage reactions to events.

func ReactionSaveCmd

func ReactionSaveCmd(cmd *cobra.Command, con *console.SliverClient, args []string)

ReactionSaveCmd - Manage reactions to events.

func ReactionSetCmd

func ReactionSetCmd(cmd *cobra.Command, con *console.SliverClient, args []string)

ReactionSetCmd - Set a reaction upon an event.

func ReactionUnsetCmd

func ReactionUnsetCmd(cmd *cobra.Command, con *console.SliverClient, args []string)

ReactionUnsetCmd - Unset a reaction upon an event.

func SaveReactions

func SaveReactions(reactions []core.Reaction) error

SaveReactions - Save the reactions to the reaction file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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