tclient

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppBuiltin = "builtin"
	AppDesktop = "desktop"
)

Variables

View Source
var Apps = map[string]struct {
	AppID   int
	AppHash string
}{

	AppBuiltin: {AppID: 15055931, AppHash: "021d433426cbb920eeb95164498fe3d3"},

	AppDesktop: {AppID: 2040, AppHash: "b18441a1ff607e10a989891a5462e627"},
}
View Source
var Device = telegram.DeviceConfig{
	DeviceModel:    "Desktop",
	SystemVersion:  "Windows 10",
	AppVersion:     "4.2.4 x64",
	LangCode:       "en",
	SystemLangCode: "en-US",
	LangPack:       "tdesktop",
}

Functions

func New

func New(ctx context.Context, o Options, login bool, middlewares ...telegram.Middleware) (*telegram.Client, error)

func NewDefaultMiddlewares

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

func Run

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

Types

type Options

type Options struct {
	KV               kv.KV
	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