handler

package
v0.0.0-...-869968c Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UpdateHandler

type UpdateHandler struct {
	// contains filtered or unexported fields
}

UpdateHandler manages Telegram updates processing and message forwarding

func NewUpdateHandler

func NewUpdateHandler() *UpdateHandler

NewUpdateHandler creates new UpdateHandler

func (*UpdateHandler) Handle

func (h *UpdateHandler) Handle(ctx context.Context, u tg.UpdatesClass) error

Handle processes incoming Telegram updates

func (*UpdateHandler) SetChannels

func (h *UpdateHandler) SetChannels(channels map[int64]*tg.InputPeerChannel)

SetChannels sets the channel mapping

func (*UpdateHandler) SetClient

func (h *UpdateHandler) SetClient(client *telegram.Client)

SetClient sets the Telegram client

func (*UpdateHandler) SetInputPeerUser

func (h *UpdateHandler) SetInputPeerUser(peer tg.InputPeerClass)

SetInputPeerUser sets the target user for message forwarding

func (*UpdateHandler) Shutdown

func (h *UpdateHandler) Shutdown()

Shutdown performs a graceful shutdown of the update handler

Jump to

Keyboard shortcuts

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