handlers

package
v2.0.0-rc.10 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: MIT Imports: 6 Imported by: 73

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackQuery

type CallbackQuery struct {
	AllowChannel bool
	Filter       filters.CallbackQuery
	Response     Response
}

func NewCallback

func NewCallback(filter filters.CallbackQuery, r Response) CallbackQuery

func (CallbackQuery) CheckUpdate

func (cb CallbackQuery) CheckUpdate(b *gotgbot.Bot, u *gotgbot.Update) bool

func (CallbackQuery) HandleUpdate

func (cb CallbackQuery) HandleUpdate(b *gotgbot.Bot, ctx *ext.Context) error

func (CallbackQuery) Name

func (cb CallbackQuery) Name() string

type ChatJoinRequest

type ChatJoinRequest struct {
	Filter   filters.ChatJoinRequest
	Response Response
}

func (ChatJoinRequest) CheckUpdate

func (r ChatJoinRequest) CheckUpdate(b *gotgbot.Bot, u *gotgbot.Update) bool

func (ChatJoinRequest) HandleUpdate

func (r ChatJoinRequest) HandleUpdate(b *gotgbot.Bot, ctx *ext.Context) error

func (ChatJoinRequest) Name

func (r ChatJoinRequest) Name() string

type ChatMember

type ChatMember struct {
	Response Response
	Filter   filters.ChatMember
}

func NewChatMember

func NewChatMember(f filters.ChatMember, r Response) ChatMember

func (ChatMember) CheckUpdate

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

func (ChatMember) HandleUpdate

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

func (ChatMember) Name

func (c ChatMember) Name() string

type ChosenInlineResult

type ChosenInlineResult struct {
	Filter   filters.ChosenInlineResult
	Response Response
}

func NewChosenInlineResult

func NewChosenInlineResult(filter filters.ChosenInlineResult, r Response) ChosenInlineResult

func (ChosenInlineResult) CheckUpdate

func (i ChosenInlineResult) CheckUpdate(b *gotgbot.Bot, u *gotgbot.Update) bool

func (ChosenInlineResult) HandleUpdate

func (i ChosenInlineResult) HandleUpdate(b *gotgbot.Bot, ctx *ext.Context) error

func (ChosenInlineResult) Name

func (i ChosenInlineResult) Name() string

type Command

type Command struct {
	Triggers     []rune
	AllowEdited  bool
	AllowChannel bool
	Command      string // should be lowercase for case-insensitivity
	Response     Response
}

func NewCommand

func NewCommand(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 InlineQuery

type InlineQuery struct {
	Filter   filters.InlineQuery
	Response Response
}

func NewInlineQuery

func NewInlineQuery(f filters.InlineQuery, r Response) InlineQuery

func (InlineQuery) CheckUpdate

func (i InlineQuery) CheckUpdate(b *gotgbot.Bot, u *gotgbot.Update) bool

func (InlineQuery) HandleUpdate

func (i InlineQuery) HandleUpdate(b *gotgbot.Bot, ctx *ext.Context) error

func (InlineQuery) Name

func (i InlineQuery) Name() string

type Message

type Message struct {
	AllowEdited  bool
	AllowChannel bool
	Filter       filters.Message
	Response     Response
}

func NewMessage

func NewMessage(f filters.Message, r Response) Message

func (Message) CheckUpdate

func (m Message) CheckUpdate(b *gotgbot.Bot, u *gotgbot.Update) bool

func (Message) HandleUpdate

func (m Message) HandleUpdate(b *gotgbot.Bot, ctx *ext.Context) error

func (Message) Name

func (m Message) Name() string

type MyChatMember

type MyChatMember struct {
	Response Response
	Filter   filters.ChatMember
}

func NewMyChatMember

func NewMyChatMember(f filters.ChatMember, r Response) MyChatMember

func (MyChatMember) CheckUpdate

func (m MyChatMember) CheckUpdate(b *gotgbot.Bot, u *gotgbot.Update) bool

func (MyChatMember) HandleUpdate

func (m MyChatMember) HandleUpdate(b *gotgbot.Bot, ctx *ext.Context) error

func (MyChatMember) Name

func (m MyChatMember) Name() string

type Poll

type Poll struct {
	Filter   filters.Poll
	Response Response
}

func NewPoll

func NewPoll(f filters.Poll, r Response) Poll

func (Poll) CheckUpdate

func (r Poll) CheckUpdate(b *gotgbot.Bot, u *gotgbot.Update) bool

func (Poll) HandleUpdate

func (r Poll) HandleUpdate(b *gotgbot.Bot, ctx *ext.Context) error

func (Poll) Name

func (r Poll) Name() string

type PollAnswer

type PollAnswer struct {
	Filter   filters.PollAnswer
	Response Response
}

func NewPollAnswer

func NewPollAnswer(f filters.PollAnswer, r Response) PollAnswer

func (PollAnswer) CheckUpdate

func (r PollAnswer) CheckUpdate(b *gotgbot.Bot, u *gotgbot.Update) bool

func (PollAnswer) HandleUpdate

func (r PollAnswer) HandleUpdate(b *gotgbot.Bot, ctx *ext.Context) error

func (PollAnswer) Name

func (r PollAnswer) 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