handlers

package
v0.0.0-...-3fecc7f Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgsCommand

type ArgsCommand struct {
	Response func(b ext.Bot, u *gotgbot.Update, args []string) error
	// contains filtered or unexported fields
}

func NewArgsCommand

func NewArgsCommand(command string, response func(b ext.Bot, u *gotgbot.Update, args []string) error) ArgsCommand

func NewPrefixArgsCommand

func NewPrefixArgsCommand(command string, prefixes []rune, response func(b ext.Bot, u *gotgbot.Update, args []string) error) ArgsCommand

func (ArgsCommand) CheckUpdate

func (h ArgsCommand) CheckUpdate(u *gotgbot.Update) (bool, error)

func (ArgsCommand) HandleUpdate

func (h ArgsCommand) HandleUpdate(u *gotgbot.Update, d gotgbot.Dispatcher) error

type CallBack

type CallBack struct {
	AllowEdited  bool
	AllowChannel bool
	Pattern      string
	Response     func(b ext.Bot, u *gotgbot.Update) error
	// contains filtered or unexported fields
}

func NewCallback

func NewCallback(pattern string, response func(b ext.Bot, u *gotgbot.Update) error) CallBack

func (CallBack) CheckUpdate

func (cb CallBack) CheckUpdate(u *gotgbot.Update) (bool, error)

func (CallBack) GetName

func (h CallBack) GetName() string

func (CallBack) HandleUpdate

func (cb CallBack) HandleUpdate(u *gotgbot.Update, d gotgbot.Dispatcher) error

type Command

type Command struct {
	Response func(b ext.Bot, u *gotgbot.Update) error
	// contains filtered or unexported fields
}

func NewCommand

func NewCommand(command string, response func(b ext.Bot, u *gotgbot.Update) error) Command

func NewPrefixCommand

func NewPrefixCommand(command string, prefixes []rune, response func(b ext.Bot, u *gotgbot.Update) error) Command

func (Command) CheckUpdate

func (h Command) CheckUpdate(u *gotgbot.Update) (bool, error)

func (Command) HandleUpdate

func (h Command) HandleUpdate(u *gotgbot.Update, d gotgbot.Dispatcher) error

type FilterFunc

type FilterFunc func(message *ext.Message) bool

type InlineQuery

type InlineQuery struct {
	Match    string
	Response func(b ext.Bot, u *gotgbot.Update) error
	// contains filtered or unexported fields
}

func NewInlineQuery

func NewInlineQuery(match string, response func(b ext.Bot, u *gotgbot.Update) error) InlineQuery

func (InlineQuery) CheckUpdate

func (h InlineQuery) CheckUpdate(u *gotgbot.Update) (bool, error)

func (InlineQuery) GetName

func (h InlineQuery) GetName() string

func (InlineQuery) HandleUpdate

func (h InlineQuery) HandleUpdate(u *gotgbot.Update, d gotgbot.Dispatcher) error

type Message

type Message struct {
	AllowEdited  bool
	AllowChannel bool
	Filter       FilterFunc
	Response     func(b ext.Bot, u *gotgbot.Update) error
	// contains filtered or unexported fields
}

func NewMessage

func NewMessage(filterFunc FilterFunc, response func(b ext.Bot, u *gotgbot.Update) error) Message

func (Message) CheckUpdate

func (h Message) CheckUpdate(u *gotgbot.Update) (bool, error)

func (Message) GetName

func (h Message) GetName() string

func (Message) HandleUpdate

func (h Message) HandleUpdate(u *gotgbot.Update, d gotgbot.Dispatcher) error

type Regex

type Regex struct {
	AllowEdited  bool
	AllowChannel bool
	Match        string
	Response     func(b ext.Bot, u *gotgbot.Update) error
	// contains filtered or unexported fields
}

func NewRegex

func NewRegex(match string, response func(b ext.Bot, u *gotgbot.Update) error) Regex

func (Regex) CheckUpdate

func (h Regex) CheckUpdate(u *gotgbot.Update) (bool, error)

func (Regex) GetName

func (h Regex) GetName() string

func (Regex) HandleUpdate

func (h Regex) HandleUpdate(u *gotgbot.Update, d gotgbot.Dispatcher) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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