Documentation ¶
Index ¶
- Variables
- type BotConfig
- type CallbackQueryHandlerFunction
- type ChatJoinRequestHandlerFunction
- type ChatMemberHandlerFunction
- type ChosenInlineResultHandlerFunction
- type InlineQueryHandlerFunction
- type MessageHandlerFunction
- type PollAnswerHandlerFunction
- type PollHandlerFunction
- type PreCheckoutQueryHandlerFunction
- type Processor
- func (p *Processor) Delete(chattable tgbotapi.Chattable) error
- func (p *Processor) GetFile(ctx context.Context, fileID string) (io.ReadCloser, error)
- func (h Processor) HandleCallbackQuery(handler CallbackQueryHandlerFunction) error
- func (h Processor) HandleChannelPost(handler MessageHandlerFunction) error
- func (h Processor) HandleChatJoinRequest(handler ChatJoinRequestHandlerFunction) error
- func (h Processor) HandleChatMember(handler ChatMemberHandlerFunction) error
- func (h Processor) HandleChosenInlineResult(handler ChosenInlineResultHandlerFunction) error
- func (h Processor) HandleCommand(handler MessageHandlerFunction) error
- func (h Processor) HandleEditedChannelPost(handler MessageHandlerFunction) error
- func (h Processor) HandleEditedMessage(handler MessageHandlerFunction) error
- func (h Processor) HandleInlineQuery(handler InlineQueryHandlerFunction) error
- func (h Processor) HandleMessage(handler MessageHandlerFunction) error
- func (h Processor) HandleMyChatMember(handler ChatMemberHandlerFunction) error
- func (h Processor) HandlePoll(handler PollHandlerFunction) error
- func (h Processor) HandlePollAnswer(handler PollAnswerHandlerFunction) error
- func (h Processor) HandlePreCheckoutQuery(handler PreCheckoutQueryHandlerFunction) error
- func (h Processor) HandleShippingQuery(handler ShippingQueryHandlerFunction) error
- func (p *Processor) Request(chattable tgbotapi.Chattable) (*tgbotapi.APIResponse, error)
- func (p *Processor) SendChattable(chattable tgbotapi.Chattable) (tgbotapi.Message, error)
- func (p *Processor) SendMediaGroup(mediaGroupConfig tgbotapi.MediaGroupConfig) ([]tgbotapi.Message, error)
- func (p *Processor) Start()
- func (p *Processor) StartAsync()
- func (p *Processor) Stop()
- type ShippingQueryHandlerFunction
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorHandlerAlreadySet = errors.New("handler already set") ErrorHandlerNotSet = errors.New("handler not set") )
Functions ¶
This section is empty.
Types ¶
type BotConfig ¶
type BotConfig struct { BotAPIToken string `json:"bot_api_token"` UpdateTimeout time.Duration `json:"update_timeout"` }
func (BotConfig) ValidateConfigFields ¶
type CallbackQueryHandlerFunction ¶
type CallbackQueryHandlerFunction func(ctx context.Context, message *tgbotapi.CallbackQuery) error
type ChatJoinRequestHandlerFunction ¶
type ChatJoinRequestHandlerFunction func(ctx context.Context, message *tgbotapi.ChatJoinRequest) error
type ChatMemberHandlerFunction ¶
type ChatMemberHandlerFunction func(ctx context.Context, message *tgbotapi.ChatMemberUpdated) error
type ChosenInlineResultHandlerFunction ¶
type ChosenInlineResultHandlerFunction func(ctx context.Context, message *tgbotapi.ChosenInlineResult) error
type InlineQueryHandlerFunction ¶
type InlineQueryHandlerFunction func(ctx context.Context, message *tgbotapi.InlineQuery) error
type MessageHandlerFunction ¶
type PollAnswerHandlerFunction ¶
type PollAnswerHandlerFunction func(ctx context.Context, message *tgbotapi.PollAnswer) error
type PollHandlerFunction ¶
type PreCheckoutQueryHandlerFunction ¶
type PreCheckoutQueryHandlerFunction func(ctx context.Context, message *tgbotapi.PreCheckoutQuery) error
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
func NewProcessor ¶
func (Processor) HandleCallbackQuery ¶
func (h Processor) HandleCallbackQuery(handler CallbackQueryHandlerFunction) error
func (Processor) HandleChannelPost ¶
func (h Processor) HandleChannelPost(handler MessageHandlerFunction) error
func (Processor) HandleChatJoinRequest ¶
func (h Processor) HandleChatJoinRequest(handler ChatJoinRequestHandlerFunction) error
func (Processor) HandleChatMember ¶
func (h Processor) HandleChatMember(handler ChatMemberHandlerFunction) error
func (Processor) HandleChosenInlineResult ¶
func (h Processor) HandleChosenInlineResult(handler ChosenInlineResultHandlerFunction) error
func (Processor) HandleCommand ¶
func (h Processor) HandleCommand(handler MessageHandlerFunction) error
func (Processor) HandleEditedChannelPost ¶
func (h Processor) HandleEditedChannelPost(handler MessageHandlerFunction) error
func (Processor) HandleEditedMessage ¶
func (h Processor) HandleEditedMessage(handler MessageHandlerFunction) error
func (Processor) HandleInlineQuery ¶
func (h Processor) HandleInlineQuery(handler InlineQueryHandlerFunction) error
func (Processor) HandleMessage ¶
func (h Processor) HandleMessage(handler MessageHandlerFunction) error
func (Processor) HandleMyChatMember ¶
func (h Processor) HandleMyChatMember(handler ChatMemberHandlerFunction) error
func (Processor) HandlePoll ¶
func (h Processor) HandlePoll(handler PollHandlerFunction) error
func (Processor) HandlePollAnswer ¶
func (h Processor) HandlePollAnswer(handler PollAnswerHandlerFunction) error
func (Processor) HandlePreCheckoutQuery ¶
func (h Processor) HandlePreCheckoutQuery(handler PreCheckoutQueryHandlerFunction) error
func (Processor) HandleShippingQuery ¶
func (h Processor) HandleShippingQuery(handler ShippingQueryHandlerFunction) error
func (*Processor) SendChattable ¶
func (*Processor) SendMediaGroup ¶
func (*Processor) StartAsync ¶
func (p *Processor) StartAsync()
type ShippingQueryHandlerFunction ¶
type ShippingQueryHandlerFunction func(ctx context.Context, message *tgbotapi.ShippingQuery) error
Click to show internal directories.
Click to hide internal directories.