tclient

package
v0.17.6 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: AGPL-3.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DCList     dcs.List
	DC         int
	PublicKeys []exchange.PublicKey
)

dc values can be overridden globally

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
	UpdateHandler    telegram.UpdateHandler
}

Jump to

Keyboard shortcuts

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