cmdHandler

package
v0.0.0-...-8376696 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Triggers     []rune
	AllowEdited  bool
	AllowChannel bool
	Command      string
	Response     Response
}

func NewChannelCommand

func NewChannelCommand(c string, r Response) Command

func NewCommand

func NewCommand(c string, r Response) Command

func NewEditedCommand

func NewEditedCommand(c string, r Response) Command

func (Command) CheckUpdate

func (c Command) CheckUpdate(b *gotgbot.Bot, u *gotgbot.Update) bool

func (Command) HandleUpdate

func (c Command) HandleUpdate(b *gotgbot.Bot, ctx *ext.Context) error

func (Command) Name

func (c Command) Name() string

type Response

type Response func(b *gotgbot.Bot, ctx *ext.Context) error

Jump to

Keyboard shortcuts

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