bot

package
v0.0.0-...-56c79ff Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptLocation

func AcceptLocation(b Sender, state state.State, texter txtr.Texter, errorHandler func(m *tb.Message, err error)) func(m *tb.Message)

func AcceptRange

func AcceptRange(b Sender, state state.State, texter txtr.Texter, errorHandler func(m *tb.Message, err error), m *tb.Message)

func AcceptText

func AcceptText(b Sender, state state.State, texter txtr.Texter, errorHandler func(m *tb.Message, err error)) func(m *tb.Message)

func ErrorHandler

func ErrorHandler(b Sender, texter txtr.Texter, log log.Logger) func(m *tb.Message, err error)

func Help

func Help(b Sender, texter txtr.Texter) func(m *tb.Message)

func IsEmptyLocation

func IsEmptyLocation(loc tb.Location) bool

func RandomLocation

func RandomLocation(lat float64, lng float64, rng WalkRange) (tb.Location, error)

Types

type Sender

type Sender interface {
	Send(to tb.Recipient, what interface{}, options ...interface{}) (*tb.Message, error)
}

type WalkRange

type WalkRange struct {
	Min int
	Max int
}

func WalkRangeFrom

func WalkRangeFrom(txt string) (WalkRange, error)

Jump to

Keyboard shortcuts

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