Documentation
¶
Index ¶
- type Client
- func (c *Client) API() *tg.Client
- func (c *Client) Downloader() *downloader.Downloader
- func (c *Client) Login(ctx context.Context, opts LoginOptions) error
- func (c *Client) Logout(ctx context.Context) error
- func (c *Client) ResolvePeer(ctx context.Context, chatArg string) (tg.InputPeerClass, error)
- func (c *Client) Run(ctx context.Context, fn func(ctx context.Context) error) error
- func (c *Client) SelfID() int64
- func (c *Client) Sender() *message.Sender
- func (c *Client) Uploader() *uploader.Uploader
- type LoginOptions
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Downloader ¶
func (c *Client) Downloader() *downloader.Downloader
func (*Client) Login ¶
func (c *Client) Login(ctx context.Context, opts LoginOptions) error
Login performs authentication (phone + code + optional 2FA). If Phone/Code are empty, prompts interactively via stdin.
func (*Client) Logout ¶
Logout terminates the current session on Telegram's servers and removes local session file.
func (*Client) ResolvePeer ¶
ResolvePeer resolves a chat argument (username, phone, or numeric ID) to an InputPeer.
type LoginOptions ¶
Click to show internal directories.
Click to hide internal directories.