telegram

package
v0.0.0-...-869968c Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*telegram.Client
	// contains filtered or unexported fields
}

Client wraps telegram.Client with additional functionality

func NewClient

func NewClient(cfg *config.Config, opts telegram.Options) *Client

NewClient creates a new Telegram client with the given configuration

func (*Client) AuthenticateIfNeeded

func (c *Client) AuthenticateIfNeeded(ctx context.Context) error

AuthenticateIfNeeded performs authentication if necessary

func (*Client) GetChannels

func (c *Client) GetChannels(ctx context.Context) (map[int64]*tg.InputPeerChannel, error)

GetChannels returns a list of subscribed channels

func (*Client) GetRecipientUser

func (c *Client) GetRecipientUser(ctx context.Context) (tg.InputPeerClass, error)

GetRecipientUser returns the target user for message forwarding

Jump to

Keyboard shortcuts

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