hook

package
v0.0.0-...-5942ca8 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package hook contains telegram update hook middleware.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UpdateHook

type UpdateHook func(ctx context.Context, u tg.UpdatesClass) error

UpdateHook middleware is called on each tg.UpdatesClass method result.

Function is called before invoker return. Returned error will be wrapped and returned as InvokeRaw result.

func (UpdateHook) Handle

func (h UpdateHook) Handle(next tg.Invoker) telegram.InvokeFunc

Handle implements telegram.Middleware.

Jump to

Keyboard shortcuts

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