witch

package
v0.0.0-...-6b2909d Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Direction

type Direction struct {
	// contains filtered or unexported fields
}

func NewDirection

func NewDirection(raw string) Direction

func NormalizeDirection

func NormalizeDirection(humanDir string) (Direction, error)

NormalizeDirection takes a direction someone might type like "up" or "north" and returns the correct Direction struct

func (Direction) Equals

func (d Direction) Equals(o Direction) bool

func (Direction) Human

func (d Direction) Human() (humanDir string)

Human returns a string form of this direction like "above" or "north"

func (Direction) Reverse

func (d Direction) Reverse() Direction

type ScriptContext

type ScriptContext struct {
	// contains filtered or unexported fields
}

func NewScriptContext

func NewScriptContext(db db.DB, getSend func(string) func(*proto.ClientMessage) error) (*ScriptContext, error)

func (*ScriptContext) Handle

func (sc *ScriptContext) Handle(vc VerbContext)

type VerbContext

type VerbContext struct {
	Verb   string
	Rest   string
	Sender db.Object
	Target db.Object
}

Jump to

Keyboard shortcuts

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