command

package
v1.7.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidOrigin added in v1.7.0

func IsValidOrigin(in string) bool

IsValidOrigin returns true if the given string is a valid Origin.

Types

type Origin

type Origin string

Origin defines the origin of the command.

const (
	// UnknownOrigin is the default value for Origin.
	UnknownOrigin Origin = "unknown"

	// TypedOrigin is the value for Origin when the command was typed by the user.
	TypedOrigin Origin = "typed"

	// ButtonClickOrigin is the value for Origin when the command was triggered by a button click.
	ButtonClickOrigin Origin = "buttonClick"

	// SelectValueChangeOrigin is the value for Origin when the command was triggered by a select value change.
	SelectValueChangeOrigin Origin = "selectValueChange"

	// MultiSelectValueChangeOrigin is the value for Origin when the command was triggered by a multi-select value change.
	MultiSelectValueChangeOrigin Origin = "multiSelectValueChange"

	// PlainTextInputOrigin is the value for Origin when the command was triggered by a plain text input.
	PlainTextInputOrigin Origin = "plainTextInput"

	// AutomationOrigin is the value for Origin when the command was triggered by an automation.
	AutomationOrigin Origin = "automation"
)

type Verb added in v0.18.0

type Verb string

Verb are commands supported by the bot.

const (
	PingVerb     Verb = "ping"
	HelpVerb     Verb = "help"
	VersionVerb  Verb = "version"
	FeedbackVerb Verb = "feedback"
	ListVerb     Verb = "list"
	EnableVerb   Verb = "enable"
	DisableVerb  Verb = "disable"
	EditVerb     Verb = "edit"
	StatusVerb   Verb = "status"
	ShowVerb     Verb = "show"
)

func AllVerbs added in v0.18.0

func AllVerbs() []Verb

Jump to

Keyboard shortcuts

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