tclient

package
v0.0.0-...-651eb4f Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, o Options) (*telegram.Client, error)

New creates new telegram client with given options. Default middlewares(retry, recovery, flood wait) always added.

func NewDefaultMiddlewares

func NewDefaultMiddlewares(ctx context.Context, timeout time.Duration) []telegram.Middleware

func RunWithAuth

func RunWithAuth(ctx context.Context, client *telegram.Client, f func(ctx context.Context) error) error

Types

type Options

type Options struct {
	AppID            int
	AppHash          string
	Session          telegram.SessionStorage
	Middlewares      []telegram.Middleware
	Proxy            string
	NTP              string
	ReconnectTimeout time.Duration
	Test             bool
	UpdateHandler    telegram.UpdateHandler
}

Jump to

Keyboard shortcuts

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