tutil

package
v0.17.4 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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 BestThreads

func BestThreads(size int64, max int) int

func FileExists

func FileExists(msg tg.MessageClass) bool

func GetBlockedDialogs

func GetBlockedDialogs(ctx context.Context, client *tg.Client) (map[int64]struct{}, error)

func GetGroupedMessages

func GetGroupedMessages(ctx context.Context, c *tg.Client, peer tg.InputPeerClass, msg *tg.Message) ([]*tg.Message, error)

func GetInputPeer

func GetInputPeer(ctx context.Context, manager *peers.Manager, from string) (peers.Peer, error)

func GetInputPeerID

func GetInputPeerID(peer tg.InputPeerClass) int64

func GetPeerID

func GetPeerID(peer tg.PeerClass) int64

func GetSingleMessage

func GetSingleMessage(ctx context.Context, c *tg.Client, peer tg.InputPeerClass, msg int) (*tg.Message, error)
func ParseMessageLink(ctx context.Context, manager *peers.Manager, s string) (peers.Peer, int, error)

ParseMessageLink return dialog id, msg id, error

Types

type Messages

type Messages []*tg.Message

func (Messages) Len

func (m Messages) Len() int

func (Messages) Less

func (m Messages) Less(i, j int) bool

func (Messages) Swap

func (m Messages) Swap(i, j int)

Jump to

Keyboard shortcuts

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