telegram-mcp-read-only/internal/tg/client.go
2025-04-01 17:48:16 +03:00

20 lines
351 B
Go

package tg
import "github.com/gotd/td/telegram"
type Client struct {
T *telegram.Client
}
func New(appID int, appHash, sessionPath string) *Client {
client := telegram.NewClient(appID, appHash, telegram.Options{
SessionStorage: &telegram.FileSessionStorage{
Path: sessionPath,
},
NoUpdates: true,
})
return &Client{
T: client,
}
}