Documentation
¶
Index ¶
- Variables
- type Context
- type Dispatcher
- type GeneralDispatcher
- func (g *GeneralDispatcher) AddHandler(handler Handler) HandlerID
- func (g *GeneralDispatcher) AddHandlerToGroup(group int, handler Handler) HandlerID
- func (g *GeneralDispatcher) RemoveGroup(group int)
- func (g *GeneralDispatcher) RemoveHandler(id HandlerID) bool
- func (g *GeneralDispatcher) Run(bot *gottbot.Bot, updateChan chan *gottbot.Update)
- type Handler
- type HandlerID
- type Updater
- type UpdaterOpts
- type WebhookOpts
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { EffectiveUser *gottbot.User EffectiveMessage *gottbot.Message EffectiveQuery *gottbot.Callback EffectiveChatId int64 Data map[string]any *gottbot.Update }
func NewContext ¶
type Dispatcher ¶
type GeneralDispatcher ¶
type GeneralDispatcher struct { ErrorHandler func(*gottbot.Bot, *gottbot.Update, error) // contains filtered or unexported fields }
func NewDispatcher ¶
func (*GeneralDispatcher) AddHandler ¶
func (g *GeneralDispatcher) AddHandler(handler Handler) HandlerID
func (*GeneralDispatcher) AddHandlerToGroup ¶
func (g *GeneralDispatcher) AddHandlerToGroup(group int, handler Handler) HandlerID
func (*GeneralDispatcher) RemoveGroup ¶
func (g *GeneralDispatcher) RemoveGroup(group int)
func (*GeneralDispatcher) RemoveHandler ¶
func (g *GeneralDispatcher) RemoveHandler(id HandlerID) bool
type Updater ¶
type Updater struct { Dispatcher Dispatcher // contains filtered or unexported fields }
func NewUpdater ¶
func NewUpdater(opts *UpdaterOpts) *Updater
func (*Updater) StartPolling ¶
func (u *Updater) StartPolling(bot *gottbot.Bot, opts *gottbot.GetUpdatesOpts)
func (*Updater) StartWebhook ¶
func (u *Updater) StartWebhook(bot *gottbot.Bot, opts *WebhookOpts)
type UpdaterOpts ¶
Click to show internal directories.
Click to hide internal directories.