mirror of
https://github.com/ManyakRus/telegram_loki.git
synced 2024-12-12 09:33:50 +02:00
сделал Pause_ctx()
This commit is contained in:
parent
c9db05a81a
commit
21d1cd290b
2
Makefile
2
Makefile
@ -54,3 +54,5 @@ lines:
|
||||
go_lines_count ./ ./docs/lines_count.txt 10
|
||||
licenses:
|
||||
golicense -out-xlsx=./docs/licenses.xlsx $(FILEAPP)
|
||||
gocyclo:
|
||||
golangci-lint run ./... --disable-all -E gocyclo -v
|
||||
|
1
bin/.gitignore
vendored
1
bin/.gitignore
vendored
@ -4,3 +4,4 @@
|
||||
/updates.bolt.db
|
||||
/log/log.jsonl
|
||||
/peers.pebble.db/
|
||||
/log
|
||||
|
@ -1 +1 @@
|
||||
2024-09-13 08:37:54.986
|
||||
2024-09-27 08:00:31.480
|
@ -1,35 +1,35 @@
|
||||
{
|
||||
"admin-service": "@rexMonstra,@AliceDwarf,@t_bondarenko140",
|
||||
"admin-service": "@omsk_guy,@AliceDwarf,@t_bondarenko140",
|
||||
"billing-status-service": "",
|
||||
"calendar-service": "@AliceDwarf",
|
||||
"claim-service": "@t_bondarenko140",
|
||||
"close-service": "@rexMonstra",
|
||||
"close-service": "@omsk_guy",
|
||||
"cryptopro-service": "",
|
||||
"docone-service": "@rexMonstra",
|
||||
"docone-service": "@omsk_guy",
|
||||
"employee-notify-service": "@t_bondarenko140",
|
||||
"fnsndscaws-service": "",
|
||||
"gomon": "",
|
||||
"inner-notify-service": "@t_bondarenko140",
|
||||
"kafka-service": "",
|
||||
"loop-service": "@rexMonstra",
|
||||
"loop-service": "@omsk_guy",
|
||||
"mock-service": "@nich2000",
|
||||
"notify-delivery-service": "",
|
||||
"notify-service": "",
|
||||
"nsi-service": "",
|
||||
"organization-checker-service": "@rexMonstra",
|
||||
"organization-checker-service": "@omsk_guy",
|
||||
"penalty-service": "@AliceDwarf",
|
||||
"pdf-service": "@t_bondarenko140",
|
||||
"plan-service": "@rexMonstra",
|
||||
"plan-service": "@omsk_guy",
|
||||
"post-office-service": "",
|
||||
"preclaim-service": "@t_bondarenko140",
|
||||
"pretrial-service": "@t_bondarenko140",
|
||||
"rabbit-service": "",
|
||||
"report-service": "@rexMonstra",
|
||||
"report-service": "@omsk_guy",
|
||||
"snotify-service": "",
|
||||
"state-duty-service": "@AliceDwarf",
|
||||
"stage-service": "@rexMonstra",
|
||||
"status-service": "@rexMonstra",
|
||||
"sync-service": "@nich2000,@ManyakRus,@rexMonstra",
|
||||
"stage-service": "@omsk_guy",
|
||||
"status-service": "@omsk_guy",
|
||||
"sync-service": "@nich2000,@ManyakRus,@omsk_guy",
|
||||
"schedule-service": "@t_bondarenko140",
|
||||
"state-duty-service": "@AliceDwarf",
|
||||
"schedule-service": "@t_bondarenko140",
|
||||
|
@ -1 +1 @@
|
||||
00153
|
||||
00154
|
10
go.mod
10
go.mod
@ -5,7 +5,7 @@ go 1.22.0
|
||||
toolchain go1.22.1
|
||||
|
||||
require (
|
||||
github.com/ManyakRus/starter v1.0.53
|
||||
github.com/ManyakRus/starter v1.0.57
|
||||
github.com/golang-module/carbon/v2 v2.3.12
|
||||
)
|
||||
|
||||
@ -31,18 +31,18 @@ require (
|
||||
github.com/gotd/contrib v0.20.0 // indirect
|
||||
github.com/gotd/ige v0.2.2 // indirect
|
||||
github.com/gotd/neo v0.1.5 // indirect
|
||||
github.com/gotd/td v0.109.0 // indirect
|
||||
github.com/gotd/td v0.110.1 // indirect
|
||||
github.com/joho/godotenv v1.5.1 // indirect
|
||||
github.com/klauspost/compress v1.17.9 // indirect
|
||||
github.com/klauspost/compress v1.17.10 // indirect
|
||||
github.com/kr/pretty v0.3.1 // indirect
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/prometheus/client_golang v1.20.3 // indirect
|
||||
github.com/prometheus/client_golang v1.20.4 // indirect
|
||||
github.com/prometheus/client_model v0.6.1 // indirect
|
||||
github.com/prometheus/common v0.59.1 // indirect
|
||||
github.com/prometheus/procfs v0.15.1 // indirect
|
||||
github.com/rogpeppe/go-internal v1.12.0 // indirect
|
||||
github.com/rogpeppe/go-internal v1.13.1 // indirect
|
||||
github.com/segmentio/asm v1.2.0 // indirect
|
||||
go.etcd.io/bbolt v1.3.11 // indirect
|
||||
go.opentelemetry.io/otel v1.30.0 // indirect
|
||||
|
20
go.sum
20
go.sum
@ -2,8 +2,8 @@ github.com/DataDog/zstd v1.5.6 h1:LbEglqepa/ipmmQJUDnSsfvA8e8IStVcGaFWDuxvGOY=
|
||||
github.com/DataDog/zstd v1.5.6/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
|
||||
github.com/ManyakRus/logrus v0.0.0-20231019115155-9e6fede0d792 h1:bxwxD0H3kSUAH3uNk/b74gkImcUiP7dyibmMoVwk338=
|
||||
github.com/ManyakRus/logrus v0.0.0-20231019115155-9e6fede0d792/go.mod h1:OUyxCVbPW/2lC1e6cM7Am941SJiC88BhNnb24x2R3a8=
|
||||
github.com/ManyakRus/starter v1.0.53 h1:hAF1Hbodwy3rALYwW22xplNqhYGd2SDIz1cAlM4j9LU=
|
||||
github.com/ManyakRus/starter v1.0.53/go.mod h1:fJC9PeOHag2XTP1833OZkp8gz6s46oMz0i+tzFt8iFg=
|
||||
github.com/ManyakRus/starter v1.0.57 h1:vaqnGuJm5t2SsVoHY8/9KegXHtMnWg1n+bc8HMBcRHA=
|
||||
github.com/ManyakRus/starter v1.0.57/go.mod h1:fJC9PeOHag2XTP1833OZkp8gz6s46oMz0i+tzFt8iFg=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
|
||||
@ -55,16 +55,16 @@ github.com/gotd/ige v0.2.2 h1:XQ9dJZwBfDnOGSTxKXBGP4gMud3Qku2ekScRjDWWfEk=
|
||||
github.com/gotd/ige v0.2.2/go.mod h1:tuCRb+Y5Y3eNTo3ypIfNpQ4MFjrnONiL2jN2AKZXmb0=
|
||||
github.com/gotd/neo v0.1.5 h1:oj0iQfMbGClP8xI59x7fE/uHoTJD7NZH9oV1WNuPukQ=
|
||||
github.com/gotd/neo v0.1.5/go.mod h1:9A2a4bn9zL6FADufBdt7tZt+WMhvZoc5gWXihOPoiBQ=
|
||||
github.com/gotd/td v0.109.0 h1:aWV9NgnlHl+4AiOGVh+KQSnlqaYpO483hUdRshkGxFA=
|
||||
github.com/gotd/td v0.109.0/go.mod h1:Fh4Y7cb3DWhTFZiHnShWOmXK3l9W1HZorfGaxxA7wuE=
|
||||
github.com/gotd/td v0.110.1 h1:worMp6CqduQye2NfkuBFhYe6kyt/f1EhmXaOEKKX+fY=
|
||||
github.com/gotd/td v0.110.1/go.mod h1:mwQQQrrAn3wizT37UjBAUB4lTy1j2RHnkRJ4z9ivqGs=
|
||||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
|
||||
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
|
||||
github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
|
||||
github.com/klauspost/compress v1.17.10 h1:oXAz+Vh0PMUvJczoi+flxpnBEPxoER1IaAnU/NMPtT0=
|
||||
github.com/klauspost/compress v1.17.10/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
@ -78,8 +78,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prometheus/client_golang v1.20.3 h1:oPksm4K8B+Vt35tUhw6GbSNSgVlVSBH0qELP/7u83l4=
|
||||
github.com/prometheus/client_golang v1.20.3/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
|
||||
github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI=
|
||||
github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
|
||||
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
|
||||
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
|
||||
github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0=
|
||||
@ -87,8 +87,8 @@ github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0Urw
|
||||
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
|
||||
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
|
||||
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
||||
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
|
||||
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
|
||||
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
|
||||
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
|
||||
github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=
|
||||
github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
|
@ -16,10 +16,10 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
//var MassTable []types.Table
|
||||
|
||||
// LastReadTime - время последнего чтения логов
|
||||
var LastReadTime time.Time
|
||||
|
||||
// Ticker - таймер, запускается каждые INTERVAL_SEND_MINUTES (10) минут
|
||||
var Ticker *time.Ticker
|
||||
|
||||
// Start - старт работы логики программы
|
||||
@ -27,7 +27,7 @@ func Start() {
|
||||
load_json.LoadJSON()
|
||||
|
||||
Date2 := time.Now()
|
||||
Date1 := carbon.CreateFromStdTime(Date2).AddMinutes(-1 * config.Settings.INTERVAL_SEND_MINUTES).ToStdTime()
|
||||
Date1 := carbon.CreateFromStdTime(Date2).AddMinutes(-1 * config.Settings.INTERVAL_SEND_MINUTES).StdTime()
|
||||
Start_period(Date1, Date2)
|
||||
|
||||
Ticker = time.NewTicker(time.Duration(config.Settings.INTERVAL_SEND_MINUTES) * time.Minute)
|
||||
@ -56,6 +56,9 @@ func Start_period(Date1, Date2 time.Time) {
|
||||
IsOnlyErrors := true
|
||||
var err1 error
|
||||
var err error
|
||||
|
||||
ctxMain := contextmain.GetContext()
|
||||
|
||||
loop_for:
|
||||
for ServiceName, DeveloperName := range types.MapServiceDeveloper {
|
||||
//проверка завершения программы
|
||||
@ -69,10 +72,10 @@ loop_for:
|
||||
//запуск проверки логов одного сервиса
|
||||
err1 = Start_period1(ServiceName, DeveloperName, Date1, Date2)
|
||||
if err1 != nil {
|
||||
micro.Pause(1000) //error: 502 Bad Gateway
|
||||
micro.Pause_ctx(ctxMain, 1000) //error: 502 Bad Gateway
|
||||
} else {
|
||||
IsOnlyErrors = false
|
||||
micro.Pause(100) //error: 429 Too Many Requests
|
||||
micro.Pause_ctx(ctxMain, 100) //error: 429 Too Many Requests
|
||||
}
|
||||
|
||||
}
|
||||
@ -87,7 +90,7 @@ loop_for:
|
||||
if err != nil {
|
||||
log.Error("telegram_client.SendMessage() error: ", err)
|
||||
}
|
||||
micro.Pause(60 * 60 * 1000) //пауза 1 час
|
||||
micro.Pause_ctx(ctxMain, 60*60*1000) //пауза 1 час
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,10 +98,12 @@ loop_for:
|
||||
func Start_period1(ServiceName, DeveloperName string, DateFrom, DateTo time.Time) error {
|
||||
var err error
|
||||
|
||||
ctxMain := contextmain.GetContext()
|
||||
|
||||
LokiMessage, err := loki.DownloadJSON(ServiceName, DateFrom, DateTo)
|
||||
if err != nil {
|
||||
//log.Error("DownloadJSON() error: ", err)
|
||||
micro.Pause(1000)
|
||||
micro.Pause_ctx(ctxMain, 1000)
|
||||
return err
|
||||
}
|
||||
|
||||
|
43
vendor/github.com/ManyakRus/starter/micro/microfunctions.go
generated
vendored
43
vendor/github.com/ManyakRus/starter/micro/microfunctions.go
generated
vendored
@ -91,6 +91,17 @@ func Pause(ms int) {
|
||||
Sleep(ms)
|
||||
}
|
||||
|
||||
// Pause_ctx - приостановка работы программы на нужное число миллисекунд, с учётом глобального контекста
|
||||
func Pause_ctx(ctx context.Context, ms int) {
|
||||
|
||||
Duration := time.Duration(ms) * time.Millisecond
|
||||
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
case <-time.After(Duration):
|
||||
}
|
||||
}
|
||||
|
||||
// FindDirUp - возвращает строку с именем каталога на уровень выше
|
||||
func FindDirUp(dir string) string {
|
||||
otvet := dir
|
||||
@ -961,3 +972,35 @@ func StringFromMassInt64(A []int64, delim string) string {
|
||||
|
||||
return buffer.String()
|
||||
}
|
||||
|
||||
// IsInt - проверяет, является ли строка целым числом
|
||||
func IsInt(s string) bool {
|
||||
Otvet := false
|
||||
if s == "" {
|
||||
return Otvet
|
||||
}
|
||||
|
||||
for _, c := range s {
|
||||
if !unicode.IsDigit(c) {
|
||||
return Otvet
|
||||
}
|
||||
}
|
||||
|
||||
Otvet = true
|
||||
return Otvet
|
||||
}
|
||||
|
||||
// Int32FromString - возвращает int32 из строки
|
||||
func Int32FromString(s string) (int32, error) {
|
||||
var Otvet int32
|
||||
var err error
|
||||
|
||||
Otvet64, err := strconv.ParseInt(s, 10, 32)
|
||||
if err != nil {
|
||||
return Otvet, err
|
||||
}
|
||||
|
||||
Otvet = int32(Otvet64)
|
||||
|
||||
return Otvet, err
|
||||
}
|
||||
|
24
vendor/github.com/ManyakRus/starter/telegram_client/telegram_client.go
generated
vendored
24
vendor/github.com/ManyakRus/starter/telegram_client/telegram_client.go
generated
vendored
@ -393,7 +393,7 @@ func (s *memorySession) StoreSession(ctx context.Context, data []byte) error {
|
||||
func CreateTelegramClient(func_OnNewMessage func(ctx context.Context, entities tg.Entities, u *tg.UpdateNewMessage, Peer1 storage.Peer) error) {
|
||||
err := CreateTelegramClient_err(func_OnNewMessage)
|
||||
if err != nil {
|
||||
log.Panic("CreateTelegramClient_err() error: ", err)
|
||||
log.Panic("CreateTelegramClient() error: ", err)
|
||||
} else {
|
||||
log.Info("CreateTelegramClient() ok, phone from: ", Settings.TELEGRAM_PHONE_FROM)
|
||||
}
|
||||
@ -420,15 +420,20 @@ func CreateTelegramClient_err(func_OnNewMessage func(ctx context.Context, entiti
|
||||
LogDir := filepath.Join(sessionDir, "log")
|
||||
logFilePath := filepath.Join(LogDir, "log.jsonl")
|
||||
ok, err := micro.FileExists(LogDir)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("FileExists() error: %w", err)
|
||||
log.Error(err)
|
||||
return err
|
||||
}
|
||||
if ok == false {
|
||||
err = fmt.Errorf("FileExists() error: need create folder: %v", LogDir)
|
||||
log.Error(err)
|
||||
//micro.CreateFolder(LogDir, 0666)
|
||||
err := micro.CreateFolder(LogDir, 0600) //rw------- т.к. файл секретный
|
||||
if err != nil {
|
||||
log.Error("CreateFolder() error: ", err)
|
||||
return err
|
||||
}
|
||||
//return err
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
err = fmt.Errorf("FileExists() error: %w", err)
|
||||
log.Debug(err)
|
||||
return err
|
||||
}
|
||||
|
||||
@ -457,9 +462,6 @@ func CreateTelegramClient_err(func_OnNewMessage func(ctx context.Context, entiti
|
||||
return errors.Wrap(err, "create pebble storage")
|
||||
}
|
||||
PeerDB = pebble.NewPeerStorage(db)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "create bolt storage")
|
||||
}
|
||||
|
||||
// Setting up client.
|
||||
//
|
||||
@ -598,7 +600,7 @@ func TimeLimit() {
|
||||
func Connect(func_OnNewMessage func(ctx context.Context, entities tg.Entities, u *tg.UpdateNewMessage, Peer1 storage.Peer) error) {
|
||||
err := Connect_err(func_OnNewMessage)
|
||||
if err != nil {
|
||||
TextError := fmt.Sprint("Telegram connected: ", Settings.TELEGRAM_PHONE_FROM)
|
||||
TextError := fmt.Sprint("Telegram connection: ", Settings.TELEGRAM_PHONE_FROM, ", error: ", err)
|
||||
log.Panic(TextError)
|
||||
} else {
|
||||
log.Info("Telegram connected: ", Settings.TELEGRAM_PHONE_FROM)
|
||||
|
15
vendor/github.com/gotd/td/telegram/client.go
generated
vendored
15
vendor/github.com/gotd/td/telegram/client.go
generated
vendored
@ -58,6 +58,14 @@ type Client struct {
|
||||
// DO NOT change the order of members arbitrarily.
|
||||
// Ref: https://pkg.go.dev/sync/atomic#pkg-note-BUG
|
||||
|
||||
// Connection factory fields.
|
||||
connsCounter atomic.Int64
|
||||
create connConstructor // immutable
|
||||
resolver dcs.Resolver // immutable
|
||||
onDead func() // immutable
|
||||
connBackoff func() backoff.BackOff // immutable
|
||||
defaultMode manager.ConnMode // immutable
|
||||
|
||||
// Migration state.
|
||||
migrationTimeout time.Duration // immutable
|
||||
migration chan struct{}
|
||||
@ -86,13 +94,6 @@ type Client struct {
|
||||
cfg *manager.AtomicConfig
|
||||
conn clientConn
|
||||
connMux sync.Mutex
|
||||
// Connection factory fields.
|
||||
create connConstructor // immutable
|
||||
resolver dcs.Resolver // immutable
|
||||
onDead func() // immutable
|
||||
connBackoff func() backoff.BackOff // immutable
|
||||
defaultMode manager.ConnMode // immutable
|
||||
connsCounter atomic.Int64
|
||||
|
||||
// Restart signal channel.
|
||||
restart chan struct{} // immutable
|
||||
|
8
vendor/github.com/gotd/td/telegram/uploader/big.go
generated
vendored
8
vendor/github.com/gotd/td/telegram/uploader/big.go
generated
vendored
@ -53,14 +53,22 @@ func (u *Uploader) bigLoop(ctx context.Context, threads int, upload *Upload) err
|
||||
r := syncio.NewReader(upload.from)
|
||||
g.Go(func(ctx context.Context) error {
|
||||
last := false
|
||||
totalStreamSize := 0
|
||||
|
||||
for {
|
||||
buf := u.pool.GetSize(u.partSize)
|
||||
|
||||
n, err := io.ReadFull(r, buf.Buf)
|
||||
if n > 0 {
|
||||
totalStreamSize += n
|
||||
}
|
||||
switch {
|
||||
case errors.Is(err, io.ErrUnexpectedEOF):
|
||||
last = true
|
||||
if upload.totalParts == -1 {
|
||||
totalParts := (totalStreamSize + u.partSize - 1) / u.partSize
|
||||
upload.totalParts = int(totalParts)
|
||||
}
|
||||
case errors.Is(err, io.EOF):
|
||||
u.pool.Put(buf)
|
||||
|
||||
|
2
vendor/github.com/gotd/td/telegram/uploader/helpers.go
generated
vendored
2
vendor/github.com/gotd/td/telegram/uploader/helpers.go
generated
vendored
@ -60,6 +60,8 @@ func (u *Uploader) FromFS(ctx context.Context, filesystem fs.FS, path string) (_
|
||||
// FromReader uploads file from given io.Reader.
|
||||
// NB: totally stream should not exceed the limit for
|
||||
// small files (10 MB as docs says, may be a bit bigger).
|
||||
// Support For Big Files
|
||||
// https://core.telegram.org/api/files#streamed-uploads
|
||||
func (u *Uploader) FromReader(ctx context.Context, name string, f io.Reader) (tg.InputFileClass, error) {
|
||||
return u.Upload(ctx, NewUpload(name, f, -1))
|
||||
}
|
||||
|
4
vendor/github.com/gotd/td/telegram/uploader/uploader.go
generated
vendored
4
vendor/github.com/gotd/td/telegram/uploader/uploader.go
generated
vendored
@ -82,6 +82,10 @@ func (u *Uploader) Upload(ctx context.Context, upload *Upload) (tg.InputFileClas
|
||||
if err := u.initUpload(upload); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if upload.totalBytes == -1 {
|
||||
upload.big = true
|
||||
upload.totalParts = -1
|
||||
}
|
||||
|
||||
if !upload.big {
|
||||
return u.uploadSmall(ctx, upload)
|
||||
|
1
vendor/github.com/gotd/td/tg/tl_account_accept_authorization_gen.go
generated
vendored
1
vendor/github.com/gotd/td/tg/tl_account_accept_authorization_gen.go
generated
vendored
@ -291,6 +291,7 @@ func (a *AccountAcceptAuthorizationRequest) GetCredentials() (value SecureCreden
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 BOT_INVALID: This is not a valid bot.
|
||||
// 400 PUBLIC_KEY_REQUIRED: A public key is required.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.acceptAuthorization for reference.
|
||||
|
10
vendor/github.com/gotd/td/tg/tl_account_business_chat_links_gen.go
generated
vendored
10
vendor/github.com/gotd/td/tg/tl_account_business_chat_links_gen.go
generated
vendored
@ -32,14 +32,18 @@ var (
|
||||
)
|
||||
|
||||
// AccountBusinessChatLinks represents TL type `account.businessChatLinks#ec43a2d1`.
|
||||
// Contains info about business chat deep links »¹ created by the current account.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#business-chat-links
|
||||
//
|
||||
// See https://core.telegram.org/constructor/account.businessChatLinks for reference.
|
||||
type AccountBusinessChatLinks struct {
|
||||
// Links field of AccountBusinessChatLinks.
|
||||
// Links
|
||||
Links []BusinessChatLink
|
||||
// Chats field of AccountBusinessChatLinks.
|
||||
// Mentioned chats
|
||||
Chats []ChatClass
|
||||
// Users field of AccountBusinessChatLinks.
|
||||
// Mentioned users
|
||||
Users []UserClass
|
||||
}
|
||||
|
||||
|
8
vendor/github.com/gotd/td/tg/tl_account_connected_bots_gen.go
generated
vendored
8
vendor/github.com/gotd/td/tg/tl_account_connected_bots_gen.go
generated
vendored
@ -32,12 +32,16 @@ var (
|
||||
)
|
||||
|
||||
// AccountConnectedBots represents TL type `account.connectedBots#17d7f87b`.
|
||||
// Info about currently connected business bots¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#connected-bots
|
||||
//
|
||||
// See https://core.telegram.org/constructor/account.connectedBots for reference.
|
||||
type AccountConnectedBots struct {
|
||||
// ConnectedBots field of AccountConnectedBots.
|
||||
// Info about the connected bots
|
||||
ConnectedBots []ConnectedBot
|
||||
// Users field of AccountConnectedBots.
|
||||
// Bot information
|
||||
Users []UserClass
|
||||
}
|
||||
|
||||
|
15
vendor/github.com/gotd/td/tg/tl_account_create_business_chat_link_gen.go
generated
vendored
15
vendor/github.com/gotd/td/tg/tl_account_create_business_chat_link_gen.go
generated
vendored
@ -32,10 +32,14 @@ var (
|
||||
)
|
||||
|
||||
// AccountCreateBusinessChatLinkRequest represents TL type `account.createBusinessChatLink#8851e68e`.
|
||||
// Create a business chat deep link »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#business-chat-links
|
||||
//
|
||||
// See https://core.telegram.org/method/account.createBusinessChatLink for reference.
|
||||
type AccountCreateBusinessChatLinkRequest struct {
|
||||
// Link field of AccountCreateBusinessChatLinkRequest.
|
||||
// Info about the link to create.
|
||||
Link InputBusinessChatLink
|
||||
}
|
||||
|
||||
@ -161,6 +165,15 @@ func (c *AccountCreateBusinessChatLinkRequest) GetLink() (value InputBusinessCha
|
||||
}
|
||||
|
||||
// AccountCreateBusinessChatLink invokes method account.createBusinessChatLink#8851e68e returning error if any.
|
||||
// Create a business chat deep link »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#business-chat-links
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 CHATLINKS_TOO_MUCH: Too many business chat links were created, please delete some older links.
|
||||
// 403 PREMIUM_ACCOUNT_REQUIRED: A premium account is required to execute this action.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.createBusinessChatLink for reference.
|
||||
func (c *Client) AccountCreateBusinessChatLink(ctx context.Context, link InputBusinessChatLink) (*BusinessChatLink, error) {
|
||||
|
18
vendor/github.com/gotd/td/tg/tl_account_delete_business_chat_link_gen.go
generated
vendored
18
vendor/github.com/gotd/td/tg/tl_account_delete_business_chat_link_gen.go
generated
vendored
@ -32,10 +32,17 @@ var (
|
||||
)
|
||||
|
||||
// AccountDeleteBusinessChatLinkRequest represents TL type `account.deleteBusinessChatLink#60073674`.
|
||||
// Delete a business chat deep link »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#business-chat-links
|
||||
//
|
||||
// See https://core.telegram.org/method/account.deleteBusinessChatLink for reference.
|
||||
type AccountDeleteBusinessChatLinkRequest struct {
|
||||
// Slug field of AccountDeleteBusinessChatLinkRequest.
|
||||
// Slug of the link, obtained as specified here »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/links#business-chat-links
|
||||
Slug string
|
||||
}
|
||||
|
||||
@ -161,6 +168,15 @@ func (d *AccountDeleteBusinessChatLinkRequest) GetSlug() (value string) {
|
||||
}
|
||||
|
||||
// AccountDeleteBusinessChatLink invokes method account.deleteBusinessChatLink#60073674 returning error if any.
|
||||
// Delete a business chat deep link »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#business-chat-links
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 CHATLINK_SLUG_EMPTY: The specified slug is empty.
|
||||
// 400 CHATLINK_SLUG_EXPIRED: The specified business chat link has expired.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.deleteBusinessChatLink for reference.
|
||||
func (c *Client) AccountDeleteBusinessChatLink(ctx context.Context, slug string) (bool, error) {
|
||||
|
26
vendor/github.com/gotd/td/tg/tl_account_disable_peer_connected_bot_gen.go
generated
vendored
26
vendor/github.com/gotd/td/tg/tl_account_disable_peer_connected_bot_gen.go
generated
vendored
@ -32,10 +32,19 @@ var (
|
||||
)
|
||||
|
||||
// AccountDisablePeerConnectedBotRequest represents TL type `account.disablePeerConnectedBot#5e437ed9`.
|
||||
// Permanently disconnect a specific chat from all business bots »¹ (equivalent to
|
||||
// specifying it in recipients.exclude_users during initial configuration with account
|
||||
// updateConnectedBot »²); to reconnect of a chat disconnected using this method the
|
||||
// user must reconnect the entire bot by invoking account.updateConnectedBot »³.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#connected-bots
|
||||
// 2. https://core.telegram.org/method/account.updateConnectedBot
|
||||
// 3. https://core.telegram.org/method/account.updateConnectedBot
|
||||
//
|
||||
// See https://core.telegram.org/method/account.disablePeerConnectedBot for reference.
|
||||
type AccountDisablePeerConnectedBotRequest struct {
|
||||
// Peer field of AccountDisablePeerConnectedBotRequest.
|
||||
// The chat to disconnect
|
||||
Peer InputPeerClass
|
||||
}
|
||||
|
||||
@ -166,6 +175,21 @@ func (d *AccountDisablePeerConnectedBotRequest) GetPeer() (value InputPeerClass)
|
||||
}
|
||||
|
||||
// AccountDisablePeerConnectedBot invokes method account.disablePeerConnectedBot#5e437ed9 returning error if any.
|
||||
// Permanently disconnect a specific chat from all business bots »¹ (equivalent to
|
||||
// specifying it in recipients.exclude_users during initial configuration with account
|
||||
// updateConnectedBot »²); to reconnect of a chat disconnected using this method the
|
||||
// user must reconnect the entire bot by invoking account.updateConnectedBot »³.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#connected-bots
|
||||
// 2. https://core.telegram.org/method/account.updateConnectedBot
|
||||
// 3. https://core.telegram.org/method/account.updateConnectedBot
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 BOT_ALREADY_DISABLED: The connected business bot was already disabled for the specified peer.
|
||||
// 400 BOT_NOT_CONNECTED_YET: No business bot is connected to the currently logged in user.
|
||||
// 400 PEER_ID_INVALID: The provided peer id is invalid.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.disablePeerConnectedBot for reference.
|
||||
func (c *Client) AccountDisablePeerConnectedBot(ctx context.Context, peer InputPeerClass) (bool, error) {
|
||||
|
20
vendor/github.com/gotd/td/tg/tl_account_edit_business_chat_link_gen.go
generated
vendored
20
vendor/github.com/gotd/td/tg/tl_account_edit_business_chat_link_gen.go
generated
vendored
@ -32,12 +32,19 @@ var (
|
||||
)
|
||||
|
||||
// AccountEditBusinessChatLinkRequest represents TL type `account.editBusinessChatLink#8c3410af`.
|
||||
// Edit a created business chat deep link »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#business-chat-links
|
||||
//
|
||||
// See https://core.telegram.org/method/account.editBusinessChatLink for reference.
|
||||
type AccountEditBusinessChatLinkRequest struct {
|
||||
// Slug field of AccountEditBusinessChatLinkRequest.
|
||||
// Slug of the link, obtained as specified here »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/links#business-chat-links
|
||||
Slug string
|
||||
// Link field of AccountEditBusinessChatLinkRequest.
|
||||
// New link information.
|
||||
Link InputBusinessChatLink
|
||||
}
|
||||
|
||||
@ -188,6 +195,15 @@ func (e *AccountEditBusinessChatLinkRequest) GetLink() (value InputBusinessChatL
|
||||
}
|
||||
|
||||
// AccountEditBusinessChatLink invokes method account.editBusinessChatLink#8c3410af returning error if any.
|
||||
// Edit a created business chat deep link »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#business-chat-links
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 CHATLINK_SLUG_EMPTY: The specified slug is empty.
|
||||
// 403 PREMIUM_ACCOUNT_REQUIRED: A premium account is required to execute this action.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.editBusinessChatLink for reference.
|
||||
func (c *Client) AccountEditBusinessChatLink(ctx context.Context, request *AccountEditBusinessChatLinkRequest) (*BusinessChatLink, error) {
|
||||
|
2
vendor/github.com/gotd/td/tg/tl_account_emoji_statuses_gen.go
generated
vendored
2
vendor/github.com/gotd/td/tg/tl_account_emoji_statuses_gen.go
generated
vendored
@ -144,7 +144,7 @@ func (e *AccountEmojiStatusesNotModified) DecodeBare(b *bin.Buffer) error {
|
||||
//
|
||||
// See https://core.telegram.org/constructor/account.emojiStatuses for reference.
|
||||
type AccountEmojiStatuses struct {
|
||||
// Hash for pagination, for more info click here¹
|
||||
// Hash used for caching, for more info click here¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/offsets#hash-generation
|
||||
|
1
vendor/github.com/gotd/td/tg/tl_account_get_authorization_form_gen.go
generated
vendored
1
vendor/github.com/gotd/td/tg/tl_account_get_authorization_form_gen.go
generated
vendored
@ -220,6 +220,7 @@ func (g *AccountGetAuthorizationFormRequest) GetPublicKey() (value string) {
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 BOT_INVALID: This is not a valid bot.
|
||||
// 400 PUBLIC_KEY_REQUIRED: A public key is required.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.getAuthorizationForm for reference.
|
||||
|
54
vendor/github.com/gotd/td/tg/tl_account_get_bot_business_connection_gen.go
generated
vendored
54
vendor/github.com/gotd/td/tg/tl_account_get_bot_business_connection_gen.go
generated
vendored
@ -32,10 +32,35 @@ var (
|
||||
)
|
||||
|
||||
// AccountGetBotBusinessConnectionRequest represents TL type `account.getBotBusinessConnection#76a86270`.
|
||||
// Bots may invoke this method to re-fetch the updateBotBusinessConnect¹ constructor
|
||||
// associated with a specific business connection_id, see here »² for more info on
|
||||
// connected business bots.
|
||||
// This is needed for example for freshly logged in bots that are receiving some
|
||||
// updateBotNewBusinessMessage³, etc. updates because some users have already connected
|
||||
// to the bot before it could login.
|
||||
// In this case, the bot is receiving messages from the business connection, but it
|
||||
// hasn't cached the associated updateBotBusinessConnect⁴ with info about the
|
||||
// connection (can it reply to messages? etc.) yet, and cannot receive the old ones
|
||||
// because they were sent when the bot wasn't logged into the session yet.
|
||||
// This method can be used to fetch info about a not-yet-cached business connection, and
|
||||
// should not be invoked if the info is already cached or to fetch changes, as eventual
|
||||
// changes will automatically be sent as new updateBotBusinessConnect⁵ updates to the
|
||||
// bot using the usual update delivery methods »⁶.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/constructor/updateBotBusinessConnect
|
||||
// 2. https://core.telegram.org/api/business#connected-bots
|
||||
// 3. https://core.telegram.org/constructor/updateBotNewBusinessMessage
|
||||
// 4. https://core.telegram.org/constructor/updateBotBusinessConnect
|
||||
// 5. https://core.telegram.org/constructor/updateBotBusinessConnect
|
||||
// 6. https://core.telegram.org/api/updates
|
||||
//
|
||||
// See https://core.telegram.org/method/account.getBotBusinessConnection for reference.
|
||||
type AccountGetBotBusinessConnectionRequest struct {
|
||||
// ConnectionID field of AccountGetBotBusinessConnectionRequest.
|
||||
// Business connection ID »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/business#connected-bots
|
||||
ConnectionID string
|
||||
}
|
||||
|
||||
@ -161,8 +186,35 @@ func (g *AccountGetBotBusinessConnectionRequest) GetConnectionID() (value string
|
||||
}
|
||||
|
||||
// AccountGetBotBusinessConnection invokes method account.getBotBusinessConnection#76a86270 returning error if any.
|
||||
// Bots may invoke this method to re-fetch the updateBotBusinessConnect¹ constructor
|
||||
// associated with a specific business connection_id, see here »² for more info on
|
||||
// connected business bots.
|
||||
// This is needed for example for freshly logged in bots that are receiving some
|
||||
// updateBotNewBusinessMessage³, etc. updates because some users have already connected
|
||||
// to the bot before it could login.
|
||||
// In this case, the bot is receiving messages from the business connection, but it
|
||||
// hasn't cached the associated updateBotBusinessConnect⁴ with info about the
|
||||
// connection (can it reply to messages? etc.) yet, and cannot receive the old ones
|
||||
// because they were sent when the bot wasn't logged into the session yet.
|
||||
// This method can be used to fetch info about a not-yet-cached business connection, and
|
||||
// should not be invoked if the info is already cached or to fetch changes, as eventual
|
||||
// changes will automatically be sent as new updateBotBusinessConnect⁵ updates to the
|
||||
// bot using the usual update delivery methods »⁶.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/constructor/updateBotBusinessConnect
|
||||
// 2. https://core.telegram.org/api/business#connected-bots
|
||||
// 3. https://core.telegram.org/constructor/updateBotNewBusinessMessage
|
||||
// 4. https://core.telegram.org/constructor/updateBotBusinessConnect
|
||||
// 5. https://core.telegram.org/constructor/updateBotBusinessConnect
|
||||
// 6. https://core.telegram.org/api/updates
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 CONNECTION_ID_INVALID: The specified connection ID is invalid.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.getBotBusinessConnection for reference.
|
||||
// Can be used by bots.
|
||||
func (c *Client) AccountGetBotBusinessConnection(ctx context.Context, connectionid string) (UpdatesClass, error) {
|
||||
var result UpdatesBox
|
||||
|
||||
|
8
vendor/github.com/gotd/td/tg/tl_account_get_business_chat_links_gen.go
generated
vendored
8
vendor/github.com/gotd/td/tg/tl_account_get_business_chat_links_gen.go
generated
vendored
@ -32,6 +32,10 @@ var (
|
||||
)
|
||||
|
||||
// AccountGetBusinessChatLinksRequest represents TL type `account.getBusinessChatLinks#6f70dde1`.
|
||||
// List all created business chat deep links »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#business-chat-links
|
||||
//
|
||||
// See https://core.telegram.org/method/account.getBusinessChatLinks for reference.
|
||||
type AccountGetBusinessChatLinksRequest struct {
|
||||
@ -128,6 +132,10 @@ func (g *AccountGetBusinessChatLinksRequest) DecodeBare(b *bin.Buffer) error {
|
||||
}
|
||||
|
||||
// AccountGetBusinessChatLinks invokes method account.getBusinessChatLinks#6f70dde1 returning error if any.
|
||||
// List all created business chat deep links »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#business-chat-links
|
||||
//
|
||||
// See https://core.telegram.org/method/account.getBusinessChatLinks for reference.
|
||||
func (c *Client) AccountGetBusinessChatLinks(ctx context.Context) (*AccountBusinessChatLinks, error) {
|
||||
|
2
vendor/github.com/gotd/td/tg/tl_account_get_channel_default_emoji_statuses_gen.go
generated
vendored
2
vendor/github.com/gotd/td/tg/tl_account_get_channel_default_emoji_statuses_gen.go
generated
vendored
@ -39,7 +39,7 @@ var (
|
||||
//
|
||||
// See https://core.telegram.org/method/account.getChannelDefaultEmojiStatuses for reference.
|
||||
type AccountGetChannelDefaultEmojiStatusesRequest struct {
|
||||
// Hash for pagination, for more info click here¹
|
||||
// Hash used for caching, for more info click here¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/offsets#hash-generation
|
||||
|
2
vendor/github.com/gotd/td/tg/tl_account_get_channel_restricted_status_emojis_gen.go
generated
vendored
2
vendor/github.com/gotd/td/tg/tl_account_get_channel_restricted_status_emojis_gen.go
generated
vendored
@ -41,7 +41,7 @@ var (
|
||||
//
|
||||
// See https://core.telegram.org/method/account.getChannelRestrictedStatusEmojis for reference.
|
||||
type AccountGetChannelRestrictedStatusEmojisRequest struct {
|
||||
// Hash for pagination, for more info click here¹
|
||||
// Hash used for caching, for more info click here¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/offsets#hash-generation
|
||||
|
2
vendor/github.com/gotd/td/tg/tl_account_get_chat_themes_gen.go
generated
vendored
2
vendor/github.com/gotd/td/tg/tl_account_get_chat_themes_gen.go
generated
vendored
@ -39,7 +39,7 @@ var (
|
||||
//
|
||||
// See https://core.telegram.org/method/account.getChatThemes for reference.
|
||||
type AccountGetChatThemesRequest struct {
|
||||
// Hash for pagination, for more info click here¹
|
||||
// Hash used for caching, for more info click here¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/offsets#hash-generation
|
||||
|
8
vendor/github.com/gotd/td/tg/tl_account_get_connected_bots_gen.go
generated
vendored
8
vendor/github.com/gotd/td/tg/tl_account_get_connected_bots_gen.go
generated
vendored
@ -32,6 +32,10 @@ var (
|
||||
)
|
||||
|
||||
// AccountGetConnectedBotsRequest represents TL type `account.getConnectedBots#4ea4c80f`.
|
||||
// List all currently connected business bots »¹
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#connected-bots
|
||||
//
|
||||
// See https://core.telegram.org/method/account.getConnectedBots for reference.
|
||||
type AccountGetConnectedBotsRequest struct {
|
||||
@ -128,6 +132,10 @@ func (g *AccountGetConnectedBotsRequest) DecodeBare(b *bin.Buffer) error {
|
||||
}
|
||||
|
||||
// AccountGetConnectedBots invokes method account.getConnectedBots#4ea4c80f returning error if any.
|
||||
// List all currently connected business bots »¹
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#connected-bots
|
||||
//
|
||||
// See https://core.telegram.org/method/account.getConnectedBots for reference.
|
||||
func (c *Client) AccountGetConnectedBots(ctx context.Context) (*AccountConnectedBots, error) {
|
||||
|
2
vendor/github.com/gotd/td/tg/tl_account_get_default_background_emojis_gen.go
generated
vendored
2
vendor/github.com/gotd/td/tg/tl_account_get_default_background_emojis_gen.go
generated
vendored
@ -41,7 +41,7 @@ var (
|
||||
//
|
||||
// See https://core.telegram.org/method/account.getDefaultBackgroundEmojis for reference.
|
||||
type AccountGetDefaultBackgroundEmojisRequest struct {
|
||||
// Hash for pagination, for more info click here¹
|
||||
// Hash used for caching, for more info click here¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/offsets#hash-generation
|
||||
|
2
vendor/github.com/gotd/td/tg/tl_account_get_default_emoji_statuses_gen.go
generated
vendored
2
vendor/github.com/gotd/td/tg/tl_account_get_default_emoji_statuses_gen.go
generated
vendored
@ -39,7 +39,7 @@ var (
|
||||
//
|
||||
// See https://core.telegram.org/method/account.getDefaultEmojiStatuses for reference.
|
||||
type AccountGetDefaultEmojiStatusesRequest struct {
|
||||
// Hash for pagination, for more info click here¹
|
||||
// Hash used for caching, for more info click here¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/offsets#hash-generation
|
||||
|
2
vendor/github.com/gotd/td/tg/tl_account_get_default_group_photo_emojis_gen.go
generated
vendored
2
vendor/github.com/gotd/td/tg/tl_account_get_default_group_photo_emojis_gen.go
generated
vendored
@ -40,7 +40,7 @@ var (
|
||||
//
|
||||
// See https://core.telegram.org/method/account.getDefaultGroupPhotoEmojis for reference.
|
||||
type AccountGetDefaultGroupPhotoEmojisRequest struct {
|
||||
// Hash for pagination, for more info click here¹
|
||||
// Hash used for caching, for more info click here¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/offsets#hash-generation
|
||||
|
2
vendor/github.com/gotd/td/tg/tl_account_get_default_profile_photo_emojis_gen.go
generated
vendored
2
vendor/github.com/gotd/td/tg/tl_account_get_default_profile_photo_emojis_gen.go
generated
vendored
@ -40,7 +40,7 @@ var (
|
||||
//
|
||||
// See https://core.telegram.org/method/account.getDefaultProfilePhotoEmojis for reference.
|
||||
type AccountGetDefaultProfilePhotoEmojisRequest struct {
|
||||
// Hash for pagination, for more info click here¹
|
||||
// Hash used for caching, for more info click here¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/offsets#hash-generation
|
||||
|
8
vendor/github.com/gotd/td/tg/tl_account_get_reactions_notify_settings_gen.go
generated
vendored
8
vendor/github.com/gotd/td/tg/tl_account_get_reactions_notify_settings_gen.go
generated
vendored
@ -32,6 +32,10 @@ var (
|
||||
)
|
||||
|
||||
// AccountGetReactionsNotifySettingsRequest represents TL type `account.getReactionsNotifySettings#6dd654c`.
|
||||
// Get the current reaction notification settings »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/reactions#notifications-about-reactions
|
||||
//
|
||||
// See https://core.telegram.org/method/account.getReactionsNotifySettings for reference.
|
||||
type AccountGetReactionsNotifySettingsRequest struct {
|
||||
@ -128,6 +132,10 @@ func (g *AccountGetReactionsNotifySettingsRequest) DecodeBare(b *bin.Buffer) err
|
||||
}
|
||||
|
||||
// AccountGetReactionsNotifySettings invokes method account.getReactionsNotifySettings#6dd654c returning error if any.
|
||||
// Get the current reaction notification settings »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/reactions#notifications-about-reactions
|
||||
//
|
||||
// See https://core.telegram.org/method/account.getReactionsNotifySettings for reference.
|
||||
func (c *Client) AccountGetReactionsNotifySettings(ctx context.Context) (*ReactionsNotifySettings, error) {
|
||||
|
2
vendor/github.com/gotd/td/tg/tl_account_get_recent_emoji_statuses_gen.go
generated
vendored
2
vendor/github.com/gotd/td/tg/tl_account_get_recent_emoji_statuses_gen.go
generated
vendored
@ -39,7 +39,7 @@ var (
|
||||
//
|
||||
// See https://core.telegram.org/method/account.getRecentEmojiStatuses for reference.
|
||||
type AccountGetRecentEmojiStatusesRequest struct {
|
||||
// Hash for pagination, for more info click here¹
|
||||
// Hash used for caching, for more info click here¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/offsets#hash-generation
|
||||
|
2
vendor/github.com/gotd/td/tg/tl_account_get_saved_ringtones_gen.go
generated
vendored
2
vendor/github.com/gotd/td/tg/tl_account_get_saved_ringtones_gen.go
generated
vendored
@ -36,7 +36,7 @@ var (
|
||||
//
|
||||
// See https://core.telegram.org/method/account.getSavedRingtones for reference.
|
||||
type AccountGetSavedRingtonesRequest struct {
|
||||
// Hash for pagination, for more info click here¹
|
||||
// Hash used for caching, for more info click here¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/offsets#hash-generation
|
||||
|
2
vendor/github.com/gotd/td/tg/tl_account_get_themes_gen.go
generated
vendored
2
vendor/github.com/gotd/td/tg/tl_account_get_themes_gen.go
generated
vendored
@ -38,7 +38,7 @@ var (
|
||||
type AccountGetThemesRequest struct {
|
||||
// Theme format, a string that identifies the theming engines supported by the client
|
||||
Format string
|
||||
// Hash for pagination, for more info click here¹
|
||||
// Hash used for caching, for more info click here¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/offsets#hash-generation
|
||||
|
2
vendor/github.com/gotd/td/tg/tl_account_get_wall_papers_gen.go
generated
vendored
2
vendor/github.com/gotd/td/tg/tl_account_get_wall_papers_gen.go
generated
vendored
@ -39,7 +39,7 @@ var (
|
||||
//
|
||||
// See https://core.telegram.org/method/account.getWallPapers for reference.
|
||||
type AccountGetWallPapersRequest struct {
|
||||
// Hash for pagination, for more info click here¹
|
||||
// Hash used for caching, for more info click here¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/offsets#hash-generation
|
||||
|
1
vendor/github.com/gotd/td/tg/tl_account_reorder_usernames_gen.go
generated
vendored
1
vendor/github.com/gotd/td/tg/tl_account_reorder_usernames_gen.go
generated
vendored
@ -180,6 +180,7 @@ func (r *AccountReorderUsernamesRequest) GetOrder() (value []string) {
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 ORDER_INVALID: The specified username order is invalid.
|
||||
// 400 USERNAME_NOT_MODIFIED: The username was not modified.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.reorderUsernames for reference.
|
||||
func (c *Client) AccountReorderUsernames(ctx context.Context, order []string) (bool, error) {
|
||||
|
18
vendor/github.com/gotd/td/tg/tl_account_resolve_business_chat_link_gen.go
generated
vendored
18
vendor/github.com/gotd/td/tg/tl_account_resolve_business_chat_link_gen.go
generated
vendored
@ -32,10 +32,17 @@ var (
|
||||
)
|
||||
|
||||
// AccountResolveBusinessChatLinkRequest represents TL type `account.resolveBusinessChatLink#5492e5ee`.
|
||||
// Resolve a business chat deep link »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#business-chat-links
|
||||
//
|
||||
// See https://core.telegram.org/method/account.resolveBusinessChatLink for reference.
|
||||
type AccountResolveBusinessChatLinkRequest struct {
|
||||
// Slug field of AccountResolveBusinessChatLinkRequest.
|
||||
// Slug of the link, obtained as specified here »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/links#business-chat-links
|
||||
Slug string
|
||||
}
|
||||
|
||||
@ -161,6 +168,15 @@ func (r *AccountResolveBusinessChatLinkRequest) GetSlug() (value string) {
|
||||
}
|
||||
|
||||
// AccountResolveBusinessChatLink invokes method account.resolveBusinessChatLink#5492e5ee returning error if any.
|
||||
// Resolve a business chat deep link »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#business-chat-links
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 CHATLINK_SLUG_EMPTY: The specified slug is empty.
|
||||
// 400 CHATLINK_SLUG_EXPIRED: The specified business chat link has expired.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.resolveBusinessChatLink for reference.
|
||||
func (c *Client) AccountResolveBusinessChatLink(ctx context.Context, slug string) (*AccountResolvedBusinessChatLinks, error) {
|
||||
|
22
vendor/github.com/gotd/td/tg/tl_account_resolved_business_chat_links_gen.go
generated
vendored
22
vendor/github.com/gotd/td/tg/tl_account_resolved_business_chat_links_gen.go
generated
vendored
@ -32,22 +32,32 @@ var (
|
||||
)
|
||||
|
||||
// AccountResolvedBusinessChatLinks represents TL type `account.resolvedBusinessChatLinks#9a23af21`.
|
||||
// Contains info about a single resolved business chat deep link »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#business-chat-links
|
||||
//
|
||||
// See https://core.telegram.org/constructor/account.resolvedBusinessChatLinks for reference.
|
||||
type AccountResolvedBusinessChatLinks struct {
|
||||
// Flags field of AccountResolvedBusinessChatLinks.
|
||||
// Flags, see TL conditional fields¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
|
||||
Flags bin.Fields
|
||||
// Peer field of AccountResolvedBusinessChatLinks.
|
||||
// Destination peer
|
||||
Peer PeerClass
|
||||
// Message field of AccountResolvedBusinessChatLinks.
|
||||
// Message to pre-fill in the message input field.
|
||||
Message string
|
||||
// Entities field of AccountResolvedBusinessChatLinks.
|
||||
// Message entities for styled text¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/entities
|
||||
//
|
||||
// Use SetEntities and GetEntities helpers.
|
||||
Entities []MessageEntityClass
|
||||
// Chats field of AccountResolvedBusinessChatLinks.
|
||||
// Mentioned chats
|
||||
Chats []ChatClass
|
||||
// Users field of AccountResolvedBusinessChatLinks.
|
||||
// Mentioned users
|
||||
Users []UserClass
|
||||
}
|
||||
|
||||
|
1
vendor/github.com/gotd/td/tg/tl_account_save_auto_save_settings_gen.go
generated
vendored
1
vendor/github.com/gotd/td/tg/tl_account_save_auto_save_settings_gen.go
generated
vendored
@ -351,7 +351,6 @@ func (s *AccountSaveAutoSaveSettingsRequest) GetSettings() (value AutoSaveSettin
|
||||
// 400 PEER_ID_INVALID: The provided peer id is invalid.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.saveAutoSaveSettings for reference.
|
||||
// Can be used by bots.
|
||||
func (c *Client) AccountSaveAutoSaveSettings(ctx context.Context, request *AccountSaveAutoSaveSettingsRequest) (bool, error) {
|
||||
var result BoolBox
|
||||
|
||||
|
4
vendor/github.com/gotd/td/tg/tl_account_save_ringtone_gen.go
generated
vendored
4
vendor/github.com/gotd/td/tg/tl_account_save_ringtone_gen.go
generated
vendored
@ -226,6 +226,10 @@ func (s *AccountSaveRingtoneRequest) GetIDAsNotEmpty() (*InputDocument, bool) {
|
||||
// 2. https://core.telegram.org/constructor/account.savedRingtoneConverted
|
||||
// 3. https://core.telegram.org/constructor/document
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 RINGTONE_INVALID: The specified ringtone is invalid.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.saveRingtone for reference.
|
||||
func (c *Client) AccountSaveRingtone(ctx context.Context, request *AccountSaveRingtoneRequest) (AccountSavedRingtoneClass, error) {
|
||||
var result AccountSavedRingtoneBox
|
||||
|
1
vendor/github.com/gotd/td/tg/tl_account_save_secure_value_gen.go
generated
vendored
1
vendor/github.com/gotd/td/tg/tl_account_save_secure_value_gen.go
generated
vendored
@ -208,6 +208,7 @@ func (s *AccountSaveSecureValueRequest) GetSecureSecretID() (value int64) {
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 PASSWORD_REQUIRED: A 2FA password must be configured to use Telegram Passport.
|
||||
// 400 SECURE_SECRET_REQUIRED: A secure secret is required.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.saveSecureValue for reference.
|
||||
func (c *Client) AccountSaveSecureValue(ctx context.Context, request *AccountSaveSecureValueRequest) (*SecureValue, error) {
|
||||
|
4
vendor/github.com/gotd/td/tg/tl_account_save_theme_gen.go
generated
vendored
4
vendor/github.com/gotd/td/tg/tl_account_save_theme_gen.go
generated
vendored
@ -196,6 +196,10 @@ func (s *AccountSaveThemeRequest) GetUnsave() (value bool) {
|
||||
// AccountSaveTheme invokes method account.saveTheme#f257106c returning error if any.
|
||||
// Save a theme
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 THEME_INVALID: Invalid theme provided.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.saveTheme for reference.
|
||||
func (c *Client) AccountSaveTheme(ctx context.Context, request *AccountSaveThemeRequest) (bool, error) {
|
||||
var result BoolBox
|
||||
|
2
vendor/github.com/gotd/td/tg/tl_account_saved_ringtones_gen.go
generated
vendored
2
vendor/github.com/gotd/td/tg/tl_account_saved_ringtones_gen.go
generated
vendored
@ -138,7 +138,7 @@ func (s *AccountSavedRingtonesNotModified) DecodeBare(b *bin.Buffer) error {
|
||||
//
|
||||
// See https://core.telegram.org/constructor/account.savedRingtones for reference.
|
||||
type AccountSavedRingtones struct {
|
||||
// Hash for pagination, for more info click here¹
|
||||
// Hash used for caching, for more info click here¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/offsets#hash-generation
|
||||
|
1
vendor/github.com/gotd/td/tg/tl_account_send_verify_email_code_gen.go
generated
vendored
1
vendor/github.com/gotd/td/tg/tl_account_send_verify_email_code_gen.go
generated
vendored
@ -199,6 +199,7 @@ func (s *AccountSendVerifyEmailCodeRequest) GetEmail() (value string) {
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 EMAIL_INVALID: The specified email is invalid.
|
||||
// 400 EMAIL_NOT_ALLOWED: The specified email cannot be used to complete the operation.
|
||||
// 400 EMAIL_NOT_SETUP: In order to change the login email with emailVerifyPurposeLoginChange, an existing login email must already be set using emailVerifyPurposeLoginSetup.
|
||||
// 400 PHONE_HASH_EXPIRED: An invalid or expired phone_code_hash was provided.
|
||||
// 400 PHONE_NUMBER_INVALID: The phone number is invalid.
|
||||
|
3
vendor/github.com/gotd/td/tg/tl_account_set_global_privacy_settings_gen.go
generated
vendored
3
vendor/github.com/gotd/td/tg/tl_account_set_global_privacy_settings_gen.go
generated
vendored
@ -166,7 +166,8 @@ func (s *AccountSetGlobalPrivacySettingsRequest) GetSettings() (value GlobalPriv
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 AUTOARCHIVE_NOT_AVAILABLE: The autoarchive setting is not available at this time: please check the value of the autoarchive_setting_available field in client config » before calling this method.
|
||||
// 400 AUTOARCHIVE_NOT_AVAILABLE: The autoarchive setting is not available at this time: please check the value of the autoarchive_setting_available field in client config » before calling this method.
|
||||
// 403 PREMIUM_ACCOUNT_REQUIRED: A premium account is required to execute this action.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.setGlobalPrivacySettings for reference.
|
||||
func (c *Client) AccountSetGlobalPrivacySettings(ctx context.Context, settings GlobalPrivacySettings) (*GlobalPrivacySettings, error) {
|
||||
|
10
vendor/github.com/gotd/td/tg/tl_account_set_reactions_notify_settings_gen.go
generated
vendored
10
vendor/github.com/gotd/td/tg/tl_account_set_reactions_notify_settings_gen.go
generated
vendored
@ -32,10 +32,14 @@ var (
|
||||
)
|
||||
|
||||
// AccountSetReactionsNotifySettingsRequest represents TL type `account.setReactionsNotifySettings#316ce548`.
|
||||
// Change the reaction notification settings »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/reactions#notifications-about-reactions
|
||||
//
|
||||
// See https://core.telegram.org/method/account.setReactionsNotifySettings for reference.
|
||||
type AccountSetReactionsNotifySettingsRequest struct {
|
||||
// Settings field of AccountSetReactionsNotifySettingsRequest.
|
||||
// New reaction notification settings.
|
||||
Settings ReactionsNotifySettings
|
||||
}
|
||||
|
||||
@ -161,6 +165,10 @@ func (s *AccountSetReactionsNotifySettingsRequest) GetSettings() (value Reaction
|
||||
}
|
||||
|
||||
// AccountSetReactionsNotifySettings invokes method account.setReactionsNotifySettings#316ce548 returning error if any.
|
||||
// Change the reaction notification settings »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/reactions#notifications-about-reactions
|
||||
//
|
||||
// See https://core.telegram.org/method/account.setReactionsNotifySettings for reference.
|
||||
func (c *Client) AccountSetReactionsNotifySettings(ctx context.Context, settings ReactionsNotifySettings) (*ReactionsNotifySettings, error) {
|
||||
|
2
vendor/github.com/gotd/td/tg/tl_account_themes_gen.go
generated
vendored
2
vendor/github.com/gotd/td/tg/tl_account_themes_gen.go
generated
vendored
@ -138,7 +138,7 @@ func (t *AccountThemesNotModified) DecodeBare(b *bin.Buffer) error {
|
||||
//
|
||||
// See https://core.telegram.org/constructor/account.themes for reference.
|
||||
type AccountThemes struct {
|
||||
// Hash for pagination, for more info click here¹
|
||||
// Hash used for caching, for more info click here¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/offsets#hash-generation
|
||||
|
18
vendor/github.com/gotd/td/tg/tl_account_toggle_connected_bot_paused_gen.go
generated
vendored
18
vendor/github.com/gotd/td/tg/tl_account_toggle_connected_bot_paused_gen.go
generated
vendored
@ -32,12 +32,17 @@ var (
|
||||
)
|
||||
|
||||
// AccountToggleConnectedBotPausedRequest represents TL type `account.toggleConnectedBotPaused#646e1097`.
|
||||
// Pause or unpause a specific chat, temporarily disconnecting it from all business bots
|
||||
// »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#connected-bots
|
||||
//
|
||||
// See https://core.telegram.org/method/account.toggleConnectedBotPaused for reference.
|
||||
type AccountToggleConnectedBotPausedRequest struct {
|
||||
// Peer field of AccountToggleConnectedBotPausedRequest.
|
||||
// The chat to pause
|
||||
Peer InputPeerClass
|
||||
// Paused field of AccountToggleConnectedBotPausedRequest.
|
||||
// Whether to pause or unpause the chat
|
||||
Paused bool
|
||||
}
|
||||
|
||||
@ -193,6 +198,15 @@ func (t *AccountToggleConnectedBotPausedRequest) GetPaused() (value bool) {
|
||||
}
|
||||
|
||||
// AccountToggleConnectedBotPaused invokes method account.toggleConnectedBotPaused#646e1097 returning error if any.
|
||||
// Pause or unpause a specific chat, temporarily disconnecting it from all business bots
|
||||
// »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#connected-bots
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 PEER_ID_INVALID: The provided peer id is invalid.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.toggleConnectedBotPaused for reference.
|
||||
func (c *Client) AccountToggleConnectedBotPaused(ctx context.Context, request *AccountToggleConnectedBotPausedRequest) (bool, error) {
|
||||
|
16
vendor/github.com/gotd/td/tg/tl_account_toggle_sponsored_messages_gen.go
generated
vendored
16
vendor/github.com/gotd/td/tg/tl_account_toggle_sponsored_messages_gen.go
generated
vendored
@ -32,10 +32,17 @@ var (
|
||||
)
|
||||
|
||||
// AccountToggleSponsoredMessagesRequest represents TL type `account.toggleSponsoredMessages#b9d9a38d`.
|
||||
// Disable or re-enable Telegram ads for the current Premium¹ account.
|
||||
// Useful for business owners that may want to launch and view their own Telegram ads via
|
||||
// the Telegram ad platform »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/premium
|
||||
// 2. https://ads.telegram.org
|
||||
//
|
||||
// See https://core.telegram.org/method/account.toggleSponsoredMessages for reference.
|
||||
type AccountToggleSponsoredMessagesRequest struct {
|
||||
// Enabled field of AccountToggleSponsoredMessagesRequest.
|
||||
// Enable or disable ads.
|
||||
Enabled bool
|
||||
}
|
||||
|
||||
@ -161,6 +168,13 @@ func (t *AccountToggleSponsoredMessagesRequest) GetEnabled() (value bool) {
|
||||
}
|
||||
|
||||
// AccountToggleSponsoredMessages invokes method account.toggleSponsoredMessages#b9d9a38d returning error if any.
|
||||
// Disable or re-enable Telegram ads for the current Premium¹ account.
|
||||
// Useful for business owners that may want to launch and view their own Telegram ads via
|
||||
// the Telegram ad platform »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/premium
|
||||
// 2. https://ads.telegram.org
|
||||
//
|
||||
// See https://core.telegram.org/method/account.toggleSponsoredMessages for reference.
|
||||
func (c *Client) AccountToggleSponsoredMessages(ctx context.Context, enabled bool) (bool, error) {
|
||||
|
1
vendor/github.com/gotd/td/tg/tl_account_toggle_username_gen.go
generated
vendored
1
vendor/github.com/gotd/td/tg/tl_account_toggle_username_gen.go
generated
vendored
@ -203,6 +203,7 @@ func (t *AccountToggleUsernameRequest) GetActive() (value bool) {
|
||||
//
|
||||
// 400 USERNAMES_ACTIVE_TOO_MUCH: The maximum number of active usernames was reached.
|
||||
// 400 USERNAME_INVALID: The provided username is not valid.
|
||||
// 400 USERNAME_NOT_MODIFIED: The username was not modified.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.toggleUsername for reference.
|
||||
func (c *Client) AccountToggleUsername(ctx context.Context, request *AccountToggleUsernameRequest) (bool, error) {
|
||||
|
19
vendor/github.com/gotd/td/tg/tl_account_update_birthday_gen.go
generated
vendored
19
vendor/github.com/gotd/td/tg/tl_account_update_birthday_gen.go
generated
vendored
@ -32,12 +32,19 @@ var (
|
||||
)
|
||||
|
||||
// AccountUpdateBirthdayRequest represents TL type `account.updateBirthday#cc6e0c11`.
|
||||
// Update our birthday, see here »¹ for more info.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/profile#birthday
|
||||
//
|
||||
// See https://core.telegram.org/method/account.updateBirthday for reference.
|
||||
type AccountUpdateBirthdayRequest struct {
|
||||
// Flags field of AccountUpdateBirthdayRequest.
|
||||
// Flags, see TL conditional fields¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
|
||||
Flags bin.Fields
|
||||
// Birthday field of AccountUpdateBirthdayRequest.
|
||||
// Birthday.
|
||||
//
|
||||
// Use SetBirthday and GetBirthday helpers.
|
||||
Birthday Birthday
|
||||
@ -200,6 +207,14 @@ func (u *AccountUpdateBirthdayRequest) GetBirthday() (value Birthday, ok bool) {
|
||||
}
|
||||
|
||||
// AccountUpdateBirthday invokes method account.updateBirthday#cc6e0c11 returning error if any.
|
||||
// Update our birthday, see here »¹ for more info.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/profile#birthday
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 BIRTHDAY_INVALID: An invalid age was specified, must be between 0 and 150 years.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.updateBirthday for reference.
|
||||
func (c *Client) AccountUpdateBirthday(ctx context.Context, request *AccountUpdateBirthdayRequest) (bool, error) {
|
||||
|
15
vendor/github.com/gotd/td/tg/tl_account_update_business_away_message_gen.go
generated
vendored
15
vendor/github.com/gotd/td/tg/tl_account_update_business_away_message_gen.go
generated
vendored
@ -32,12 +32,19 @@ var (
|
||||
)
|
||||
|
||||
// AccountUpdateBusinessAwayMessageRequest represents TL type `account.updateBusinessAwayMessage#a26a7fa5`.
|
||||
// Set a list of Telegram Business away messages¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#away-messages
|
||||
//
|
||||
// See https://core.telegram.org/method/account.updateBusinessAwayMessage for reference.
|
||||
type AccountUpdateBusinessAwayMessageRequest struct {
|
||||
// Flags field of AccountUpdateBusinessAwayMessageRequest.
|
||||
// Flags, see TL conditional fields¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
|
||||
Flags bin.Fields
|
||||
// Message field of AccountUpdateBusinessAwayMessageRequest.
|
||||
// Away message configuration and contents.
|
||||
//
|
||||
// Use SetMessage and GetMessage helpers.
|
||||
Message InputBusinessAwayMessage
|
||||
@ -200,6 +207,10 @@ func (u *AccountUpdateBusinessAwayMessageRequest) GetMessage() (value InputBusin
|
||||
}
|
||||
|
||||
// AccountUpdateBusinessAwayMessage invokes method account.updateBusinessAwayMessage#a26a7fa5 returning error if any.
|
||||
// Set a list of Telegram Business away messages¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#away-messages
|
||||
//
|
||||
// See https://core.telegram.org/method/account.updateBusinessAwayMessage for reference.
|
||||
func (c *Client) AccountUpdateBusinessAwayMessage(ctx context.Context, request *AccountUpdateBusinessAwayMessageRequest) (bool, error) {
|
||||
|
15
vendor/github.com/gotd/td/tg/tl_account_update_business_greeting_message_gen.go
generated
vendored
15
vendor/github.com/gotd/td/tg/tl_account_update_business_greeting_message_gen.go
generated
vendored
@ -32,12 +32,19 @@ var (
|
||||
)
|
||||
|
||||
// AccountUpdateBusinessGreetingMessageRequest represents TL type `account.updateBusinessGreetingMessage#66cdafc4`.
|
||||
// Set a list of Telegram Business greeting messages¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#greeting-messages
|
||||
//
|
||||
// See https://core.telegram.org/method/account.updateBusinessGreetingMessage for reference.
|
||||
type AccountUpdateBusinessGreetingMessageRequest struct {
|
||||
// Flags field of AccountUpdateBusinessGreetingMessageRequest.
|
||||
// Flags, see TL conditional fields¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
|
||||
Flags bin.Fields
|
||||
// Message field of AccountUpdateBusinessGreetingMessageRequest.
|
||||
// Greeting message configuration and contents.
|
||||
//
|
||||
// Use SetMessage and GetMessage helpers.
|
||||
Message InputBusinessGreetingMessage
|
||||
@ -200,6 +207,10 @@ func (u *AccountUpdateBusinessGreetingMessageRequest) GetMessage() (value InputB
|
||||
}
|
||||
|
||||
// AccountUpdateBusinessGreetingMessage invokes method account.updateBusinessGreetingMessage#66cdafc4 returning error if any.
|
||||
// Set a list of Telegram Business greeting messages¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#greeting-messages
|
||||
//
|
||||
// See https://core.telegram.org/method/account.updateBusinessGreetingMessage for reference.
|
||||
func (c *Client) AccountUpdateBusinessGreetingMessage(ctx context.Context, request *AccountUpdateBusinessGreetingMessageRequest) (bool, error) {
|
||||
|
15
vendor/github.com/gotd/td/tg/tl_account_update_business_intro_gen.go
generated
vendored
15
vendor/github.com/gotd/td/tg/tl_account_update_business_intro_gen.go
generated
vendored
@ -32,12 +32,19 @@ var (
|
||||
)
|
||||
|
||||
// AccountUpdateBusinessIntroRequest represents TL type `account.updateBusinessIntro#a614d034`.
|
||||
// Set or remove the Telegram Business introduction »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#business-introduction
|
||||
//
|
||||
// See https://core.telegram.org/method/account.updateBusinessIntro for reference.
|
||||
type AccountUpdateBusinessIntroRequest struct {
|
||||
// Flags field of AccountUpdateBusinessIntroRequest.
|
||||
// Flags, see TL conditional fields¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
|
||||
Flags bin.Fields
|
||||
// Intro field of AccountUpdateBusinessIntroRequest.
|
||||
// Telegram Business introduction, to remove it call the method without setting this flag.
|
||||
//
|
||||
// Use SetIntro and GetIntro helpers.
|
||||
Intro InputBusinessIntro
|
||||
@ -200,6 +207,10 @@ func (u *AccountUpdateBusinessIntroRequest) GetIntro() (value InputBusinessIntro
|
||||
}
|
||||
|
||||
// AccountUpdateBusinessIntro invokes method account.updateBusinessIntro#a614d034 returning error if any.
|
||||
// Set or remove the Telegram Business introduction »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#business-introduction
|
||||
//
|
||||
// See https://core.telegram.org/method/account.updateBusinessIntro for reference.
|
||||
func (c *Client) AccountUpdateBusinessIntro(ctx context.Context, request *AccountUpdateBusinessIntroRequest) (bool, error) {
|
||||
|
26
vendor/github.com/gotd/td/tg/tl_account_update_business_location_gen.go
generated
vendored
26
vendor/github.com/gotd/td/tg/tl_account_update_business_location_gen.go
generated
vendored
@ -32,16 +32,28 @@ var (
|
||||
)
|
||||
|
||||
// AccountUpdateBusinessLocationRequest represents TL type `account.updateBusinessLocation#9e6b131a`.
|
||||
// Businesses »¹ may advertise their location using this method, see here »² for more
|
||||
// info.
|
||||
// To remove business location information invoke the method without setting any of the
|
||||
// parameters.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#location
|
||||
// 2. https://core.telegram.org/api/business#location
|
||||
//
|
||||
// See https://core.telegram.org/method/account.updateBusinessLocation for reference.
|
||||
type AccountUpdateBusinessLocationRequest struct {
|
||||
// Flags field of AccountUpdateBusinessLocationRequest.
|
||||
// Flags, see TL conditional fields¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
|
||||
Flags bin.Fields
|
||||
// GeoPoint field of AccountUpdateBusinessLocationRequest.
|
||||
// Optional, contains a set of geographical coordinates.
|
||||
//
|
||||
// Use SetGeoPoint and GetGeoPoint helpers.
|
||||
GeoPoint InputGeoPointClass
|
||||
// Address field of AccountUpdateBusinessLocationRequest.
|
||||
// Mandatory when setting/updating the location, contains a textual description of the
|
||||
// address (max 96 UTF-8 chars).
|
||||
//
|
||||
// Use SetAddress and GetAddress helpers.
|
||||
Address string
|
||||
@ -262,6 +274,14 @@ func (u *AccountUpdateBusinessLocationRequest) GetGeoPointAsNotEmpty() (*InputGe
|
||||
}
|
||||
|
||||
// AccountUpdateBusinessLocation invokes method account.updateBusinessLocation#9e6b131a returning error if any.
|
||||
// Businesses »¹ may advertise their location using this method, see here »² for more
|
||||
// info.
|
||||
// To remove business location information invoke the method without setting any of the
|
||||
// parameters.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#location
|
||||
// 2. https://core.telegram.org/api/business#location
|
||||
//
|
||||
// See https://core.telegram.org/method/account.updateBusinessLocation for reference.
|
||||
func (c *Client) AccountUpdateBusinessLocation(ctx context.Context, request *AccountUpdateBusinessLocationRequest) (bool, error) {
|
||||
|
35
vendor/github.com/gotd/td/tg/tl_account_update_business_work_hours_gen.go
generated
vendored
35
vendor/github.com/gotd/td/tg/tl_account_update_business_work_hours_gen.go
generated
vendored
@ -32,12 +32,26 @@ var (
|
||||
)
|
||||
|
||||
// AccountUpdateBusinessWorkHoursRequest represents TL type `account.updateBusinessWorkHours#4b00e066`.
|
||||
// Specify a set of Telegram Business opening hours¹.
|
||||
// This info will be contained in userFull².business_work_hours.
|
||||
// To remove all opening hours, invoke the method without setting the business_work_hours
|
||||
// field.
|
||||
// Note that the opening hours specified by the user must be appropriately validated and
|
||||
// transformed before invoking the method, as specified here »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#opening-hours
|
||||
// 2. https://core.telegram.org/constructor/userFull
|
||||
// 3. https://core.telegram.org/api/business#opening-hours
|
||||
//
|
||||
// See https://core.telegram.org/method/account.updateBusinessWorkHours for reference.
|
||||
type AccountUpdateBusinessWorkHoursRequest struct {
|
||||
// Flags field of AccountUpdateBusinessWorkHoursRequest.
|
||||
// Flags, see TL conditional fields¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
|
||||
Flags bin.Fields
|
||||
// BusinessWorkHours field of AccountUpdateBusinessWorkHoursRequest.
|
||||
// Opening hours (optional, if not set removes all opening hours).
|
||||
//
|
||||
// Use SetBusinessWorkHours and GetBusinessWorkHours helpers.
|
||||
BusinessWorkHours BusinessWorkHours
|
||||
@ -200,6 +214,23 @@ func (u *AccountUpdateBusinessWorkHoursRequest) GetBusinessWorkHours() (value Bu
|
||||
}
|
||||
|
||||
// AccountUpdateBusinessWorkHours invokes method account.updateBusinessWorkHours#4b00e066 returning error if any.
|
||||
// Specify a set of Telegram Business opening hours¹.
|
||||
// This info will be contained in userFull².business_work_hours.
|
||||
// To remove all opening hours, invoke the method without setting the business_work_hours
|
||||
// field.
|
||||
// Note that the opening hours specified by the user must be appropriately validated and
|
||||
// transformed before invoking the method, as specified here »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#opening-hours
|
||||
// 2. https://core.telegram.org/constructor/userFull
|
||||
// 3. https://core.telegram.org/api/business#opening-hours
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 BUSINESS_WORK_HOURS_EMPTY: No work hours were specified.
|
||||
// 400 BUSINESS_WORK_HOURS_PERIOD_INVALID: The specified work hours are invalid, see here » for the exact requirements.
|
||||
// 400 TIMEZONE_INVALID: The specified timezone does not exist.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.updateBusinessWorkHours for reference.
|
||||
func (c *Client) AccountUpdateBusinessWorkHours(ctx context.Context, request *AccountUpdateBusinessWorkHoursRequest) (bool, error) {
|
||||
|
1
vendor/github.com/gotd/td/tg/tl_account_update_color_gen.go
generated
vendored
1
vendor/github.com/gotd/td/tg/tl_account_update_color_gen.go
generated
vendored
@ -303,6 +303,7 @@ func (u *AccountUpdateColorRequest) GetBackgroundEmojiID() (value int64, ok bool
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 COLOR_INVALID: The specified color palette ID was invalid.
|
||||
// 403 PREMIUM_ACCOUNT_REQUIRED: A premium account is required to execute this action.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.updateColor for reference.
|
||||
func (c *Client) AccountUpdateColor(ctx context.Context, request *AccountUpdateColorRequest) (bool, error) {
|
||||
|
33
vendor/github.com/gotd/td/tg/tl_account_update_connected_bot_gen.go
generated
vendored
33
vendor/github.com/gotd/td/tg/tl_account_update_connected_bot_gen.go
generated
vendored
@ -32,18 +32,30 @@ var (
|
||||
)
|
||||
|
||||
// AccountUpdateConnectedBotRequest represents TL type `account.updateConnectedBot#43d8521d`.
|
||||
// Connect a business bot »¹ to the current account, or to change the current
|
||||
// connection settings.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#connected-bots
|
||||
//
|
||||
// See https://core.telegram.org/method/account.updateConnectedBot for reference.
|
||||
type AccountUpdateConnectedBotRequest struct {
|
||||
// Flags field of AccountUpdateConnectedBotRequest.
|
||||
// Flags, see TL conditional fields¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
|
||||
Flags bin.Fields
|
||||
// CanReply field of AccountUpdateConnectedBotRequest.
|
||||
// Whether the bot can reply to messages it receives from us, on behalf of us using the
|
||||
// business connection¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/business#connected-bots
|
||||
CanReply bool
|
||||
// Deleted field of AccountUpdateConnectedBotRequest.
|
||||
// Whether to fully disconnect the bot from the current account.
|
||||
Deleted bool
|
||||
// Bot field of AccountUpdateConnectedBotRequest.
|
||||
// The bot to connect or disconnect
|
||||
Bot InputUserClass
|
||||
// Recipients field of AccountUpdateConnectedBotRequest.
|
||||
// Configuration for the business connection
|
||||
Recipients InputBusinessBotRecipients
|
||||
}
|
||||
|
||||
@ -281,6 +293,17 @@ func (u *AccountUpdateConnectedBotRequest) GetRecipients() (value InputBusinessB
|
||||
}
|
||||
|
||||
// AccountUpdateConnectedBot invokes method account.updateConnectedBot#43d8521d returning error if any.
|
||||
// Connect a business bot »¹ to the current account, or to change the current
|
||||
// connection settings.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#connected-bots
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 BOT_BUSINESS_MISSING: The specified bot is not a business bot (the user.bot_business flag is not set).
|
||||
// 400 BUSINESS_RECIPIENTS_EMPTY: You didn't set any flag in inputBusinessBotRecipients, thus the bot cannot work with any peer.
|
||||
// 403 PREMIUM_ACCOUNT_REQUIRED: A premium account is required to execute this action.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.updateConnectedBot for reference.
|
||||
func (c *Client) AccountUpdateConnectedBot(ctx context.Context, request *AccountUpdateConnectedBotRequest) (UpdatesClass, error) {
|
||||
|
21
vendor/github.com/gotd/td/tg/tl_account_update_personal_channel_gen.go
generated
vendored
21
vendor/github.com/gotd/td/tg/tl_account_update_personal_channel_gen.go
generated
vendored
@ -32,10 +32,21 @@ var (
|
||||
)
|
||||
|
||||
// AccountUpdatePersonalChannelRequest represents TL type `account.updatePersonalChannel#d94305e0`.
|
||||
// Associate (or remove) a personal channel »¹, that will be listed on our personal
|
||||
// profile page »².
|
||||
// Changing it will emit an updateUser¹ update.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/channel
|
||||
// 2. https://core.telegram.org/api/profile#personal-channel
|
||||
// 3. https://core.telegram.org/constructor/updateUser
|
||||
//
|
||||
// See https://core.telegram.org/method/account.updatePersonalChannel for reference.
|
||||
type AccountUpdatePersonalChannelRequest struct {
|
||||
// Channel field of AccountUpdatePersonalChannelRequest.
|
||||
// The channel, pass inputChannelEmpty¹ to remove it.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/constructor/inputChannelEmpty
|
||||
Channel InputChannelClass
|
||||
}
|
||||
|
||||
@ -171,6 +182,14 @@ func (u *AccountUpdatePersonalChannelRequest) GetChannelAsNotEmpty() (NotEmptyIn
|
||||
}
|
||||
|
||||
// AccountUpdatePersonalChannel invokes method account.updatePersonalChannel#d94305e0 returning error if any.
|
||||
// Associate (or remove) a personal channel »¹, that will be listed on our personal
|
||||
// profile page »².
|
||||
// Changing it will emit an updateUser¹ update.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/channel
|
||||
// 2. https://core.telegram.org/api/profile#personal-channel
|
||||
// 3. https://core.telegram.org/constructor/updateUser
|
||||
//
|
||||
// See https://core.telegram.org/method/account.updatePersonalChannel for reference.
|
||||
func (c *Client) AccountUpdatePersonalChannel(ctx context.Context, channel InputChannelClass) (bool, error) {
|
||||
|
4
vendor/github.com/gotd/td/tg/tl_account_upload_ringtone_gen.go
generated
vendored
4
vendor/github.com/gotd/td/tg/tl_account_upload_ringtone_gen.go
generated
vendored
@ -231,6 +231,10 @@ func (u *AccountUploadRingtoneRequest) GetMimeType() (value string) {
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/method/account.saveRingtone
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 RINGTONE_MIME_INVALID: The MIME type for the ringtone is invalid.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.uploadRingtone for reference.
|
||||
func (c *Client) AccountUploadRingtone(ctx context.Context, request *AccountUploadRingtoneRequest) (DocumentClass, error) {
|
||||
var result DocumentBox
|
||||
|
1
vendor/github.com/gotd/td/tg/tl_account_upload_theme_gen.go
generated
vendored
1
vendor/github.com/gotd/td/tg/tl_account_upload_theme_gen.go
generated
vendored
@ -304,6 +304,7 @@ func (u *AccountUploadThemeRequest) GetMimeType() (value string) {
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 THEME_FILE_INVALID: Invalid theme file provided.
|
||||
// 400 THEME_MIME_INVALID: The theme's MIME type is invalid.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.uploadTheme for reference.
|
||||
func (c *Client) AccountUploadTheme(ctx context.Context, request *AccountUploadThemeRequest) (DocumentClass, error) {
|
||||
|
2
vendor/github.com/gotd/td/tg/tl_account_verify_email_gen.go
generated
vendored
2
vendor/github.com/gotd/td/tg/tl_account_verify_email_gen.go
generated
vendored
@ -204,7 +204,9 @@ func (v *AccountVerifyEmailRequest) GetVerification() (value EmailVerificationCl
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 EMAIL_INVALID: The specified email is invalid.
|
||||
// 400 EMAIL_NOT_ALLOWED: The specified email cannot be used to complete the operation.
|
||||
// 400 EMAIL_VERIFY_EXPIRED: The verification email has expired.
|
||||
// 400 PHONE_NUMBER_INVALID: The phone number is invalid.
|
||||
//
|
||||
// See https://core.telegram.org/method/account.verifyEmail for reference.
|
||||
func (c *Client) AccountVerifyEmail(ctx context.Context, request *AccountVerifyEmailRequest) (AccountEmailVerifiedClass, error) {
|
||||
|
2
vendor/github.com/gotd/td/tg/tl_account_wall_papers_gen.go
generated
vendored
2
vendor/github.com/gotd/td/tg/tl_account_wall_papers_gen.go
generated
vendored
@ -144,7 +144,7 @@ func (w *AccountWallPapersNotModified) DecodeBare(b *bin.Buffer) error {
|
||||
//
|
||||
// See https://core.telegram.org/constructor/account.wallPapers for reference.
|
||||
type AccountWallPapers struct {
|
||||
// Hash for pagination, for more info click here¹
|
||||
// Hash used for caching, for more info click here¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/offsets#hash-generation
|
||||
|
2
vendor/github.com/gotd/td/tg/tl_attach_menu_bots_gen.go
generated
vendored
2
vendor/github.com/gotd/td/tg/tl_attach_menu_bots_gen.go
generated
vendored
@ -141,7 +141,7 @@ func (a *AttachMenuBotsNotModified) DecodeBare(b *bin.Buffer) error {
|
||||
//
|
||||
// See https://core.telegram.org/constructor/attachMenuBots for reference.
|
||||
type AttachMenuBots struct {
|
||||
// Hash for pagination, for more info click here¹
|
||||
// Hash used for caching, for more info click here¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/offsets#hash-generation
|
||||
|
1
vendor/github.com/gotd/td/tg/tl_auth_check_recovery_password_gen.go
generated
vendored
1
vendor/github.com/gotd/td/tg/tl_auth_check_recovery_password_gen.go
generated
vendored
@ -178,6 +178,7 @@ func (c *AuthCheckRecoveryPasswordRequest) GetCode() (value string) {
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 CODE_EMPTY: The provided code is empty.
|
||||
// 400 PASSWORD_RECOVERY_EXPIRED: The recovery code has expired.
|
||||
//
|
||||
// See https://core.telegram.org/method/auth.checkRecoveryPassword for reference.
|
||||
|
18
vendor/github.com/gotd/td/tg/tl_auth_report_missing_code_gen.go
generated
vendored
18
vendor/github.com/gotd/td/tg/tl_auth_report_missing_code_gen.go
generated
vendored
@ -32,14 +32,21 @@ var (
|
||||
)
|
||||
|
||||
// AuthReportMissingCodeRequest represents TL type `auth.reportMissingCode#cb9deff6`.
|
||||
// Official apps only, reports that the SMS authentication code wasn't delivered.
|
||||
//
|
||||
// See https://core.telegram.org/method/auth.reportMissingCode for reference.
|
||||
type AuthReportMissingCodeRequest struct {
|
||||
// PhoneNumber field of AuthReportMissingCodeRequest.
|
||||
// Phone number where we were supposed to receive the code
|
||||
PhoneNumber string
|
||||
// PhoneCodeHash field of AuthReportMissingCodeRequest.
|
||||
// The phone code hash obtained from auth.sendCode¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/method/auth.sendCode
|
||||
PhoneCodeHash string
|
||||
// Mnc field of AuthReportMissingCodeRequest.
|
||||
// MNC¹ of the current network operator.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://en.wikipedia.org/wiki/Mobile_country_code
|
||||
Mnc string
|
||||
}
|
||||
|
||||
@ -215,6 +222,11 @@ func (r *AuthReportMissingCodeRequest) GetMnc() (value string) {
|
||||
}
|
||||
|
||||
// AuthReportMissingCode invokes method auth.reportMissingCode#cb9deff6 returning error if any.
|
||||
// Official apps only, reports that the SMS authentication code wasn't delivered.
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 PHONE_NUMBER_INVALID: The phone number is invalid.
|
||||
//
|
||||
// See https://core.telegram.org/method/auth.reportMissingCode for reference.
|
||||
func (c *Client) AuthReportMissingCode(ctx context.Context, request *AuthReportMissingCodeRequest) (bool, error) {
|
||||
|
6
vendor/github.com/gotd/td/tg/tl_auth_request_firebase_sms_gen.go
generated
vendored
6
vendor/github.com/gotd/td/tg/tl_auth_request_firebase_sms_gen.go
generated
vendored
@ -55,7 +55,10 @@ type AuthRequestFirebaseSMSRequest struct {
|
||||
//
|
||||
// Use SetSafetyNetToken and GetSafetyNetToken helpers.
|
||||
SafetyNetToken string
|
||||
// PlayIntegrityToken field of AuthRequestFirebaseSMSRequest.
|
||||
// On Android, an object obtained as described in the auth documentation »¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/auth
|
||||
//
|
||||
// Use SetPlayIntegrityToken and GetPlayIntegrityToken helpers.
|
||||
PlayIntegrityToken string
|
||||
@ -364,6 +367,7 @@ func (r *AuthRequestFirebaseSMSRequest) GetIosPushSecret() (value string, ok boo
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 PHONE_CODE_EMPTY: phone_code is missing.
|
||||
// 400 PHONE_NUMBER_INVALID: The phone number is invalid.
|
||||
//
|
||||
// See https://core.telegram.org/method/auth.requestFirebaseSms for reference.
|
||||
|
12
vendor/github.com/gotd/td/tg/tl_auth_resend_code_gen.go
generated
vendored
12
vendor/github.com/gotd/td/tg/tl_auth_resend_code_gen.go
generated
vendored
@ -40,7 +40,10 @@ var (
|
||||
//
|
||||
// See https://core.telegram.org/method/auth.resendCode for reference.
|
||||
type AuthResendCodeRequest struct {
|
||||
// Flags field of AuthResendCodeRequest.
|
||||
// Flags, see TL conditional fields¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
|
||||
Flags bin.Fields
|
||||
// The phone number
|
||||
PhoneNumber string
|
||||
@ -49,7 +52,12 @@ type AuthResendCodeRequest struct {
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/method/auth.sendCode
|
||||
PhoneCodeHash string
|
||||
// Reason field of AuthResendCodeRequest.
|
||||
// Official clients only, used if the device integrity verification failed, and no secret
|
||||
// could be obtained to invoke auth.requestFirebaseSms¹: in this case, the device
|
||||
// integrity verification failure reason must be passed here.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/method/auth.requestFirebaseSms
|
||||
//
|
||||
// Use SetReason and GetReason helpers.
|
||||
Reason string
|
||||
|
1
vendor/github.com/gotd/td/tg/tl_auth_send_code_gen.go
generated
vendored
1
vendor/github.com/gotd/td/tg/tl_auth_send_code_gen.go
generated
vendored
@ -263,6 +263,7 @@ func (s *AuthSendCodeRequest) GetSettings() (value CodeSettings) {
|
||||
// 406 PHONE_PASSWORD_FLOOD: You have tried logging in too many times.
|
||||
// 400 PHONE_PASSWORD_PROTECTED: This phone is password protected.
|
||||
// 400 SMS_CODE_CREATE_FAILED: An error occurred while creating the SMS code.
|
||||
// 406 UPDATE_APP_TO_LOGIN: Please update to the latest version of MadelineProto to login.
|
||||
//
|
||||
// See https://core.telegram.org/method/auth.sendCode for reference.
|
||||
func (c *Client) AuthSendCode(ctx context.Context, request *AuthSendCodeRequest) (AuthSentCodeClass, error) {
|
||||
|
23
vendor/github.com/gotd/td/tg/tl_auth_sent_code_type_gen.go
generated
vendored
23
vendor/github.com/gotd/td/tg/tl_auth_sent_code_type_gen.go
generated
vendored
@ -1494,11 +1494,11 @@ type AuthSentCodeTypeFirebaseSMS struct {
|
||||
//
|
||||
// Use SetNonce and GetNonce helpers.
|
||||
Nonce []byte
|
||||
// PlayIntegrityProjectID field of AuthSentCodeTypeFirebaseSMS.
|
||||
// Google Play Integrity project ID
|
||||
//
|
||||
// Use SetPlayIntegrityProjectID and GetPlayIntegrityProjectID helpers.
|
||||
PlayIntegrityProjectID int64
|
||||
// PlayIntegrityNonce field of AuthSentCodeTypeFirebaseSMS.
|
||||
// Play Integrity API nonce
|
||||
//
|
||||
// Use SetPlayIntegrityNonce and GetPlayIntegrityNonce helpers.
|
||||
PlayIntegrityNonce []byte
|
||||
@ -1883,12 +1883,18 @@ func (s *AuthSentCodeTypeFirebaseSMS) GetLength() (value int) {
|
||||
}
|
||||
|
||||
// AuthSentCodeTypeSMSWord represents TL type `auth.sentCodeTypeSmsWord#a416ac81`.
|
||||
// The code was sent via SMS as a secret word, starting with the letter specified in
|
||||
// beginning
|
||||
//
|
||||
// See https://core.telegram.org/constructor/auth.sentCodeTypeSmsWord for reference.
|
||||
type AuthSentCodeTypeSMSWord struct {
|
||||
// Flags field of AuthSentCodeTypeSMSWord.
|
||||
// Flags, see TL conditional fields¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
|
||||
Flags bin.Fields
|
||||
// Beginning field of AuthSentCodeTypeSMSWord.
|
||||
// If set, the secret word in the sent SMS (which may contain multiple words) starts with
|
||||
// this letter.
|
||||
//
|
||||
// Use SetBeginning and GetBeginning helpers.
|
||||
Beginning string
|
||||
@ -2056,12 +2062,17 @@ func (s *AuthSentCodeTypeSMSWord) GetBeginning() (value string, ok bool) {
|
||||
}
|
||||
|
||||
// AuthSentCodeTypeSMSPhrase represents TL type `auth.sentCodeTypeSmsPhrase#b37794af`.
|
||||
// The code was sent via SMS as a secret phrase starting with the word specified in
|
||||
// beginning
|
||||
//
|
||||
// See https://core.telegram.org/constructor/auth.sentCodeTypeSmsPhrase for reference.
|
||||
type AuthSentCodeTypeSMSPhrase struct {
|
||||
// Flags field of AuthSentCodeTypeSMSPhrase.
|
||||
// Flags, see TL conditional fields¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
|
||||
Flags bin.Fields
|
||||
// Beginning field of AuthSentCodeTypeSMSPhrase.
|
||||
// If set, the secret phrase (and the SMS) starts with this word.
|
||||
//
|
||||
// Use SetBeginning and GetBeginning helpers.
|
||||
Beginning string
|
||||
|
1
vendor/github.com/gotd/td/tg/tl_auth_sign_in_gen.go
generated
vendored
1
vendor/github.com/gotd/td/tg/tl_auth_sign_in_gen.go
generated
vendored
@ -325,6 +325,7 @@ func (s *AuthSignInRequest) GetEmailVerification() (value EmailVerificationClass
|
||||
// 406 PHONE_NUMBER_INVALID: The phone number is invalid.
|
||||
// 400 PHONE_NUMBER_UNOCCUPIED: The phone number is not yet being used.
|
||||
// 500 SIGN_IN_FAILED: Failure while signing in.
|
||||
// 406 UPDATE_APP_TO_LOGIN: Please update to the latest version of MadelineProto to login.
|
||||
//
|
||||
// See https://core.telegram.org/method/auth.signIn for reference.
|
||||
func (c *Client) AuthSignIn(ctx context.Context, request *AuthSignInRequest) (AuthAuthorizationClass, error) {
|
||||
|
8
vendor/github.com/gotd/td/tg/tl_auth_sign_up_gen.go
generated
vendored
8
vendor/github.com/gotd/td/tg/tl_auth_sign_up_gen.go
generated
vendored
@ -36,9 +36,13 @@ var (
|
||||
//
|
||||
// See https://core.telegram.org/method/auth.signUp for reference.
|
||||
type AuthSignUpRequest struct {
|
||||
// Flags field of AuthSignUpRequest.
|
||||
// Flags, see TL conditional fields¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
|
||||
Flags bin.Fields
|
||||
// NoJoinedNotifications field of AuthSignUpRequest.
|
||||
// If set, users on Telegram that have already added phone_number to their contacts will
|
||||
// not receive signup notifications about this user.
|
||||
NoJoinedNotifications bool
|
||||
// Phone number in the international format
|
||||
PhoneNumber string
|
||||
|
44
vendor/github.com/gotd/td/tg/tl_available_effect_gen.go
generated
vendored
44
vendor/github.com/gotd/td/tg/tl_available_effect_gen.go
generated
vendored
@ -32,24 +32,54 @@ var (
|
||||
)
|
||||
|
||||
// AvailableEffect represents TL type `availableEffect#93c3e27e`.
|
||||
// Represents a message effect »¹.
|
||||
// All long IDs except for id are document¹.ids from the containing messages
|
||||
// availableEffects² constructor.
|
||||
// See here »¹ for more info on how to use following fields.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/effects
|
||||
// 2. https://core.telegram.org/constructor/document
|
||||
// 3. https://core.telegram.org/constructor/messages.availableEffects
|
||||
// 4. https://core.telegram.org/api/effects
|
||||
//
|
||||
// See https://core.telegram.org/constructor/availableEffect for reference.
|
||||
type AvailableEffect struct {
|
||||
// Flags field of AvailableEffect.
|
||||
// Flags, see TL conditional fields¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
|
||||
Flags bin.Fields
|
||||
// PremiumRequired field of AvailableEffect.
|
||||
// Whether a Premium¹ subscription is required to use this effect.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/premium
|
||||
PremiumRequired bool
|
||||
// ID field of AvailableEffect.
|
||||
// Unique effect ID.
|
||||
ID int64
|
||||
// Emoticon field of AvailableEffect.
|
||||
// Emoji corresponding to the effect, to be used as icon for the effect if static_icon_id
|
||||
// is not set.
|
||||
Emoticon string
|
||||
// StaticIconID field of AvailableEffect.
|
||||
// ID of the document containing the static icon (WEBP) of the effect.
|
||||
//
|
||||
// Use SetStaticIconID and GetStaticIconID helpers.
|
||||
StaticIconID int64
|
||||
// EffectStickerID field of AvailableEffect.
|
||||
// Contains the preview animation (TGS format »)¹, used for the effect selection menu.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/stickers#animated-stickers
|
||||
EffectStickerID int64
|
||||
// EffectAnimationID field of AvailableEffect.
|
||||
// If set, contains the actual animated effect (TGS format »)¹. If not set, the
|
||||
// animated effect must be set equal to the premium animated sticker effect² associated
|
||||
// to the animated sticker specified in effect_sticker_id (always different from the
|
||||
// preview animation, fetched thanks to the videoSize³ of type f as specified here
|
||||
// »⁴).
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/stickers#animated-stickers
|
||||
// 2) https://core.telegram.org/api/stickers#premium-animated-sticker-effects
|
||||
// 3) https://core.telegram.org/constructor/videoSize
|
||||
// 4) https://core.telegram.org/api/stickers#premium-animated-sticker-effects
|
||||
//
|
||||
// Use SetEffectAnimationID and GetEffectAnimationID helpers.
|
||||
EffectAnimationID int64
|
||||
|
18
vendor/github.com/gotd/td/tg/tl_birthday_gen.go
generated
vendored
18
vendor/github.com/gotd/td/tg/tl_birthday_gen.go
generated
vendored
@ -32,16 +32,26 @@ var (
|
||||
)
|
||||
|
||||
// Birthday represents TL type `birthday#6c8e1e06`.
|
||||
// Birthday¹ information for a user.
|
||||
// Also used to invite users to gift Telegram Premium subscriptions »¹ to other users
|
||||
// with birthdays within a +1/-1 day time range, related to the current day.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/profile#birthday
|
||||
// 2. https://core.telegram.org/api/premium#gifting-telegram-premium
|
||||
//
|
||||
// See https://core.telegram.org/constructor/birthday for reference.
|
||||
type Birthday struct {
|
||||
// Flags field of Birthday.
|
||||
// Flags, see TL conditional fields¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
|
||||
Flags bin.Fields
|
||||
// Day field of Birthday.
|
||||
// Birth day
|
||||
Day int
|
||||
// Month field of Birthday.
|
||||
// Birth month
|
||||
Month int
|
||||
// Year field of Birthday.
|
||||
// (Optional) birth year.
|
||||
//
|
||||
// Use SetYear and GetYear helpers.
|
||||
Year int
|
||||
|
6
vendor/github.com/gotd/td/tg/tl_boost_gen.go
generated
vendored
6
vendor/github.com/gotd/td/tg/tl_boost_gen.go
generated
vendored
@ -44,14 +44,14 @@ type Boost struct {
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
|
||||
Flags bin.Fields
|
||||
// Whether this boost was applied because the channel directly gifted a subscription to
|
||||
// the user¹.
|
||||
// Whether this boost was applied because the channel/supergroup directly gifted a
|
||||
// subscription to the user¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/giveaways
|
||||
Gift bool
|
||||
// Whether this boost was applied because the user was chosen in a giveaway started by
|
||||
// the channel¹.
|
||||
// the channel/supergroup¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/giveaways
|
||||
|
31
vendor/github.com/gotd/td/tg/tl_bot_business_connection_gen.go
generated
vendored
31
vendor/github.com/gotd/td/tg/tl_bot_business_connection_gen.go
generated
vendored
@ -32,22 +32,39 @@ var (
|
||||
)
|
||||
|
||||
// BotBusinessConnection represents TL type `botBusinessConnection#896433b4`.
|
||||
// Contains info about a bot business connection¹.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/business#connected-bots
|
||||
//
|
||||
// See https://core.telegram.org/constructor/botBusinessConnection for reference.
|
||||
type BotBusinessConnection struct {
|
||||
// Flags field of BotBusinessConnection.
|
||||
// Flags, see TL conditional fields¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
|
||||
Flags bin.Fields
|
||||
// CanReply field of BotBusinessConnection.
|
||||
// Whether the bot can reply on behalf of the user to messages it receives through the
|
||||
// business connection
|
||||
CanReply bool
|
||||
// Disabled field of BotBusinessConnection.
|
||||
// Whether this business connection is currently disabled
|
||||
Disabled bool
|
||||
// ConnectionID field of BotBusinessConnection.
|
||||
// Business connection ID, used to identify messages coming from the connection and to
|
||||
// reply to them as specified here »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/business#connected-bots
|
||||
ConnectionID string
|
||||
// UserID field of BotBusinessConnection.
|
||||
// ID of the user that the bot is connected to via this connection.
|
||||
UserID int64
|
||||
// DCID field of BotBusinessConnection.
|
||||
// ID of the datacenter where to send queries wrapped in a invokeWithBusinessConnection¹
|
||||
// as specified here »².
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/method/invokeWithBusinessConnection
|
||||
// 2) https://core.telegram.org/api/business#connected-bots
|
||||
DCID int
|
||||
// Date field of BotBusinessConnection.
|
||||
// When was the connection created.
|
||||
Date int
|
||||
}
|
||||
|
||||
|
6
vendor/github.com/gotd/td/tg/tl_bot_info_gen.go
generated
vendored
6
vendor/github.com/gotd/td/tg/tl_bot_info_gen.go
generated
vendored
@ -41,7 +41,11 @@ type BotInfo struct {
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
|
||||
Flags bin.Fields
|
||||
// HasPreviewMedias field of BotInfo.
|
||||
// If set, the bot has some preview medias for the configured Main Mini App, see here
|
||||
// »¹ for more info on Main Mini App preview medias.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
HasPreviewMedias bool
|
||||
// ID of the bot
|
||||
//
|
||||
|
3
vendor/github.com/gotd/td/tg/tl_bot_inline_message_gen.go
generated
vendored
3
vendor/github.com/gotd/td/tg/tl_bot_inline_message_gen.go
generated
vendored
@ -1740,10 +1740,11 @@ type BotInlineMessageMediaInvoice struct {
|
||||
//
|
||||
// Use SetPhoto and GetPhoto helpers.
|
||||
Photo WebDocumentClass
|
||||
// Three-letter ISO 4217 currency¹ code
|
||||
// Three-letter ISO 4217 currency¹ code, or XTR for Telegram Stars².
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/bots/payments#supported-currencies
|
||||
// 2) https://core.telegram.org/api/stars
|
||||
Currency string
|
||||
// Total price in the smallest units of the currency (integer, not float/double). For
|
||||
// example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in
|
||||
|
8
vendor/github.com/gotd/td/tg/tl_bot_preview_media_gen.go
generated
vendored
8
vendor/github.com/gotd/td/tg/tl_bot_preview_media_gen.go
generated
vendored
@ -32,12 +32,16 @@ var (
|
||||
)
|
||||
|
||||
// BotPreviewMedia represents TL type `botPreviewMedia#23e91ba3`.
|
||||
// Represents a Main Mini App preview media, see here »¹ for more info.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
//
|
||||
// See https://core.telegram.org/constructor/botPreviewMedia for reference.
|
||||
type BotPreviewMedia struct {
|
||||
// Date field of BotPreviewMedia.
|
||||
// When was this media last updated.
|
||||
Date int
|
||||
// Media field of BotPreviewMedia.
|
||||
// The actual photo/video.
|
||||
Media MessageMediaClass
|
||||
}
|
||||
|
||||
|
27
vendor/github.com/gotd/td/tg/tl_bots_add_preview_media_gen.go
generated
vendored
27
vendor/github.com/gotd/td/tg/tl_bots_add_preview_media_gen.go
generated
vendored
@ -32,14 +32,24 @@ var (
|
||||
)
|
||||
|
||||
// BotsAddPreviewMediaRequest represents TL type `bots.addPreviewMedia#17aeb75a`.
|
||||
// Add a main mini app preview, see here »¹ for more info.
|
||||
// Only owners of bots with a configured Main Mini App can use this method, see see here
|
||||
// »¹ for more info on how to check if you can invoke this method.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
// 2. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.addPreviewMedia for reference.
|
||||
type BotsAddPreviewMediaRequest struct {
|
||||
// Bot field of BotsAddPreviewMediaRequest.
|
||||
// The bot that owns the Main Mini App.
|
||||
Bot InputUserClass
|
||||
// LangCode field of BotsAddPreviewMediaRequest.
|
||||
// ISO 639-1 language code, indicating the localization of the preview to add.
|
||||
LangCode string
|
||||
// Media field of BotsAddPreviewMediaRequest.
|
||||
// The photo/video preview, uploaded using messages.uploadMedia¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/method/messages.uploadMedia
|
||||
Media InputMediaClass
|
||||
}
|
||||
|
||||
@ -225,6 +235,17 @@ func (a *BotsAddPreviewMediaRequest) GetMedia() (value InputMediaClass) {
|
||||
}
|
||||
|
||||
// BotsAddPreviewMedia invokes method bots.addPreviewMedia#17aeb75a returning error if any.
|
||||
// Add a main mini app preview, see here »¹ for more info.
|
||||
// Only owners of bots with a configured Main Mini App can use this method, see see here
|
||||
// »¹ for more info on how to check if you can invoke this method.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
// 2. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 BOT_INVALID: This is not a valid bot.
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.addPreviewMedia for reference.
|
||||
func (c *Client) BotsAddPreviewMedia(ctx context.Context, request *BotsAddPreviewMediaRequest) (*BotPreviewMedia, error) {
|
||||
|
1
vendor/github.com/gotd/td/tg/tl_bots_answer_webhook_json_query_gen.go
generated
vendored
1
vendor/github.com/gotd/td/tg/tl_bots_answer_webhook_json_query_gen.go
generated
vendored
@ -196,6 +196,7 @@ func (a *BotsAnswerWebhookJSONQueryRequest) GetData() (value DataJSON) {
|
||||
// 400 DATA_JSON_INVALID: The provided JSON data is invalid.
|
||||
// 400 QUERY_ID_INVALID: The query ID is invalid.
|
||||
// 403 USER_BOT_INVALID: User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts.
|
||||
// 400 USER_BOT_REQUIRED: This method can only be called by a bot.
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.answerWebhookJSONQuery for reference.
|
||||
// Can be used by bots.
|
||||
|
27
vendor/github.com/gotd/td/tg/tl_bots_delete_preview_media_gen.go
generated
vendored
27
vendor/github.com/gotd/td/tg/tl_bots_delete_preview_media_gen.go
generated
vendored
@ -32,14 +32,24 @@ var (
|
||||
)
|
||||
|
||||
// BotsDeletePreviewMediaRequest represents TL type `bots.deletePreviewMedia#2d0135b3`.
|
||||
// Delete a main mini app preview, see here »¹ for more info.
|
||||
// Only owners of bots with a configured Main Mini App can use this method, see see here
|
||||
// »¹ for more info on how to check if you can invoke this method.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
// 2. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.deletePreviewMedia for reference.
|
||||
type BotsDeletePreviewMediaRequest struct {
|
||||
// Bot field of BotsDeletePreviewMediaRequest.
|
||||
// The bot that owns the Main Mini App.
|
||||
Bot InputUserClass
|
||||
// LangCode field of BotsDeletePreviewMediaRequest.
|
||||
// ISO 639-1 language code, indicating the localization of the preview to delete.
|
||||
LangCode string
|
||||
// Media field of BotsDeletePreviewMediaRequest.
|
||||
// The photo/video preview to delete, previously fetched as specified here »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
Media []InputMediaClass
|
||||
}
|
||||
|
||||
@ -243,6 +253,17 @@ func (d *BotsDeletePreviewMediaRequest) MapMedia() (value InputMediaClassArray)
|
||||
}
|
||||
|
||||
// BotsDeletePreviewMedia invokes method bots.deletePreviewMedia#2d0135b3 returning error if any.
|
||||
// Delete a main mini app preview, see here »¹ for more info.
|
||||
// Only owners of bots with a configured Main Mini App can use this method, see see here
|
||||
// »¹ for more info on how to check if you can invoke this method.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
// 2. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 BOT_INVALID: This is not a valid bot.
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.deletePreviewMedia for reference.
|
||||
func (c *Client) BotsDeletePreviewMedia(ctx context.Context, request *BotsDeletePreviewMediaRequest) (bool, error) {
|
||||
|
32
vendor/github.com/gotd/td/tg/tl_bots_edit_preview_media_gen.go
generated
vendored
32
vendor/github.com/gotd/td/tg/tl_bots_edit_preview_media_gen.go
generated
vendored
@ -32,16 +32,29 @@ var (
|
||||
)
|
||||
|
||||
// BotsEditPreviewMediaRequest represents TL type `bots.editPreviewMedia#8525606f`.
|
||||
// Edit a main mini app preview, see here »¹ for more info.
|
||||
// Only owners of bots with a configured Main Mini App can use this method, see see here
|
||||
// »¹ for more info on how to check if you can invoke this method.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
// 2. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.editPreviewMedia for reference.
|
||||
type BotsEditPreviewMediaRequest struct {
|
||||
// Bot field of BotsEditPreviewMediaRequest.
|
||||
// The bot that owns the Main Mini App.
|
||||
Bot InputUserClass
|
||||
// LangCode field of BotsEditPreviewMediaRequest.
|
||||
// ISO 639-1 language code, indicating the localization of the preview to edit.
|
||||
LangCode string
|
||||
// Media field of BotsEditPreviewMediaRequest.
|
||||
// The photo/video preview to replace, previously fetched as specified here »¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
Media InputMediaClass
|
||||
// NewMedia field of BotsEditPreviewMediaRequest.
|
||||
// The new photo/video preview, uploaded using messages.uploadMedia¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/method/messages.uploadMedia
|
||||
NewMedia InputMediaClass
|
||||
}
|
||||
|
||||
@ -257,6 +270,17 @@ func (e *BotsEditPreviewMediaRequest) GetNewMedia() (value InputMediaClass) {
|
||||
}
|
||||
|
||||
// BotsEditPreviewMedia invokes method bots.editPreviewMedia#8525606f returning error if any.
|
||||
// Edit a main mini app preview, see here »¹ for more info.
|
||||
// Only owners of bots with a configured Main Mini App can use this method, see see here
|
||||
// »¹ for more info on how to check if you can invoke this method.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
// 2. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 BOT_INVALID: This is not a valid bot.
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.editPreviewMedia for reference.
|
||||
func (c *Client) BotsEditPreviewMedia(ctx context.Context, request *BotsEditPreviewMediaRequest) (*BotPreviewMedia, error) {
|
||||
|
1
vendor/github.com/gotd/td/tg/tl_bots_get_bot_commands_gen.go
generated
vendored
1
vendor/github.com/gotd/td/tg/tl_bots_get_bot_commands_gen.go
generated
vendored
@ -199,6 +199,7 @@ func (g *BotsGetBotCommandsRequest) GetLangCode() (value string) {
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 USER_BOT_INVALID: User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts.
|
||||
// 400 USER_BOT_REQUIRED: This method can only be called by a bot.
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.getBotCommands for reference.
|
||||
// Can be used by bots.
|
||||
|
1
vendor/github.com/gotd/td/tg/tl_bots_get_bot_info_gen.go
generated
vendored
1
vendor/github.com/gotd/td/tg/tl_bots_get_bot_info_gen.go
generated
vendored
@ -243,6 +243,7 @@ func (g *BotsGetBotInfoRequest) GetLangCode() (value string) {
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 BOT_INVALID: This is not a valid bot.
|
||||
// 400 LANG_CODE_INVALID: The specified language code is invalid.
|
||||
// 400 USER_BOT_INVALID: User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts.
|
||||
//
|
||||
|
21
vendor/github.com/gotd/td/tg/tl_bots_get_popular_app_bots_gen.go
generated
vendored
21
vendor/github.com/gotd/td/tg/tl_bots_get_popular_app_bots_gen.go
generated
vendored
@ -32,12 +32,24 @@ var (
|
||||
)
|
||||
|
||||
// BotsGetPopularAppBotsRequest represents TL type `bots.getPopularAppBots#c2510192`.
|
||||
// Fetch popular Main Mini Apps¹, to be used in the apps tab of global search »².
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/bots/webapps#main-mini-apps
|
||||
// 2. https://core.telegram.org/api/search#apps-tab
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.getPopularAppBots for reference.
|
||||
type BotsGetPopularAppBotsRequest struct {
|
||||
// Offset field of BotsGetPopularAppBotsRequest.
|
||||
// Offset for pagination¹, initially an empty string, then re-use the next_offset
|
||||
// returned by the previous query.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/offsets
|
||||
Offset string
|
||||
// Limit field of BotsGetPopularAppBotsRequest.
|
||||
// Maximum number of results to return, see pagination¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/offsets
|
||||
Limit int
|
||||
}
|
||||
|
||||
@ -188,6 +200,11 @@ func (g *BotsGetPopularAppBotsRequest) GetLimit() (value int) {
|
||||
}
|
||||
|
||||
// BotsGetPopularAppBots invokes method bots.getPopularAppBots#c2510192 returning error if any.
|
||||
// Fetch popular Main Mini Apps¹, to be used in the apps tab of global search »².
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/bots/webapps#main-mini-apps
|
||||
// 2. https://core.telegram.org/api/search#apps-tab
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.getPopularAppBots for reference.
|
||||
func (c *Client) BotsGetPopularAppBots(ctx context.Context, request *BotsGetPopularAppBotsRequest) (*BotsPopularAppBots, error) {
|
||||
|
28
vendor/github.com/gotd/td/tg/tl_bots_get_preview_info_gen.go
generated
vendored
28
vendor/github.com/gotd/td/tg/tl_bots_get_preview_info_gen.go
generated
vendored
@ -32,12 +32,22 @@ var (
|
||||
)
|
||||
|
||||
// BotsGetPreviewInfoRequest represents TL type `bots.getPreviewInfo#423ab3ad`.
|
||||
// Bot owners only, fetch main mini app preview information, see here »¹ for more info.
|
||||
// Note: technically non-owners may also invoke this method, but it will always behave
|
||||
// exactly as bots.getPreviewMedias¹, returning only previews for the current language
|
||||
// and an empty lang_codes array, regardless of the passed lang_code, so please only use
|
||||
// bots.getPreviewMedias² if you're not the owner of the bot.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
// 2. https://core.telegram.org/method/bots.getPreviewMedias
|
||||
// 3. https://core.telegram.org/method/bots.getPreviewMedias
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.getPreviewInfo for reference.
|
||||
type BotsGetPreviewInfoRequest struct {
|
||||
// Bot field of BotsGetPreviewInfoRequest.
|
||||
// The bot that owns the Main Mini App.
|
||||
Bot InputUserClass
|
||||
// LangCode field of BotsGetPreviewInfoRequest.
|
||||
// Fetch previews for the specified ISO 639-1 language code.
|
||||
LangCode string
|
||||
}
|
||||
|
||||
@ -193,6 +203,20 @@ func (g *BotsGetPreviewInfoRequest) GetLangCode() (value string) {
|
||||
}
|
||||
|
||||
// BotsGetPreviewInfo invokes method bots.getPreviewInfo#423ab3ad returning error if any.
|
||||
// Bot owners only, fetch main mini app preview information, see here »¹ for more info.
|
||||
// Note: technically non-owners may also invoke this method, but it will always behave
|
||||
// exactly as bots.getPreviewMedias¹, returning only previews for the current language
|
||||
// and an empty lang_codes array, regardless of the passed lang_code, so please only use
|
||||
// bots.getPreviewMedias² if you're not the owner of the bot.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
// 2. https://core.telegram.org/method/bots.getPreviewMedias
|
||||
// 3. https://core.telegram.org/method/bots.getPreviewMedias
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 BOT_INVALID: This is not a valid bot.
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.getPreviewInfo for reference.
|
||||
func (c *Client) BotsGetPreviewInfo(ctx context.Context, request *BotsGetPreviewInfoRequest) (*BotsPreviewInfo, error) {
|
||||
|
14
vendor/github.com/gotd/td/tg/tl_bots_get_preview_medias_gen.go
generated
vendored
14
vendor/github.com/gotd/td/tg/tl_bots_get_preview_medias_gen.go
generated
vendored
@ -32,10 +32,14 @@ var (
|
||||
)
|
||||
|
||||
// BotsGetPreviewMediasRequest represents TL type `bots.getPreviewMedias#a2a5594d`.
|
||||
// Fetch main mini app previews, see here »¹ for more info.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.getPreviewMedias for reference.
|
||||
type BotsGetPreviewMediasRequest struct {
|
||||
// Bot field of BotsGetPreviewMediasRequest.
|
||||
// The bot that owns the Main Mini App.
|
||||
Bot InputUserClass
|
||||
}
|
||||
|
||||
@ -166,6 +170,14 @@ func (g *BotsGetPreviewMediasRequest) GetBot() (value InputUserClass) {
|
||||
}
|
||||
|
||||
// BotsGetPreviewMedias invokes method bots.getPreviewMedias#a2a5594d returning error if any.
|
||||
// Fetch main mini app previews, see here »¹ for more info.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 BOT_INVALID: This is not a valid bot.
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.getPreviewMedias for reference.
|
||||
func (c *Client) BotsGetPreviewMedias(ctx context.Context, bot InputUserClass) ([]BotPreviewMedia, error) {
|
||||
|
1
vendor/github.com/gotd/td/tg/tl_bots_invoke_web_view_custom_method_gen.go
generated
vendored
1
vendor/github.com/gotd/td/tg/tl_bots_invoke_web_view_custom_method_gen.go
generated
vendored
@ -247,6 +247,7 @@ func (i *BotsInvokeWebViewCustomMethodRequest) GetParams() (value DataJSON) {
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 BOT_INVALID: This is not a valid bot.
|
||||
// 400 DATA_JSON_INVALID: The provided JSON data is invalid.
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.invokeWebViewCustomMethod for reference.
|
||||
func (c *Client) BotsInvokeWebViewCustomMethod(ctx context.Context, request *BotsInvokeWebViewCustomMethodRequest) (*DataJSON, error) {
|
||||
|
20
vendor/github.com/gotd/td/tg/tl_bots_popular_app_bots_gen.go
generated
vendored
20
vendor/github.com/gotd/td/tg/tl_bots_popular_app_bots_gen.go
generated
vendored
@ -32,16 +32,30 @@ var (
|
||||
)
|
||||
|
||||
// BotsPopularAppBots represents TL type `bots.popularAppBots#1991b13b`.
|
||||
// Popular Main Mini Apps¹, to be used in the apps tab of global search »².
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/bots/webapps#main-mini-apps
|
||||
// 2. https://core.telegram.org/api/search#apps-tab
|
||||
//
|
||||
// See https://core.telegram.org/constructor/bots.popularAppBots for reference.
|
||||
type BotsPopularAppBots struct {
|
||||
// Flags field of BotsPopularAppBots.
|
||||
// Flags, see TL conditional fields¹
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
|
||||
Flags bin.Fields
|
||||
// NextOffset field of BotsPopularAppBots.
|
||||
// Offset for pagination¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/offsets
|
||||
//
|
||||
// Use SetNextOffset and GetNextOffset helpers.
|
||||
NextOffset string
|
||||
// Users field of BotsPopularAppBots.
|
||||
// The bots associated to each Main Mini App, see here »¹ for more info.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/api/bots/webapps#main-mini-apps
|
||||
Users []UserClass
|
||||
}
|
||||
|
||||
|
15
vendor/github.com/gotd/td/tg/tl_bots_preview_info_gen.go
generated
vendored
15
vendor/github.com/gotd/td/tg/tl_bots_preview_info_gen.go
generated
vendored
@ -32,12 +32,23 @@ var (
|
||||
)
|
||||
|
||||
// BotsPreviewInfo represents TL type `bots.previewInfo#ca71d64`.
|
||||
// Contains info about Main Mini App previews, see here »¹ for more info.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
//
|
||||
// See https://core.telegram.org/constructor/bots.previewInfo for reference.
|
||||
type BotsPreviewInfo struct {
|
||||
// Media field of BotsPreviewInfo.
|
||||
// All preview medias for the language code passed to bots.getPreviewInfo¹.
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/method/bots.getPreviewInfo
|
||||
Media []BotPreviewMedia
|
||||
// LangCodes field of BotsPreviewInfo.
|
||||
// All available language codes for which preview medias were uploaded (regardless of the
|
||||
// language code passed to bots.getPreviewInfo¹).
|
||||
//
|
||||
// Links:
|
||||
// 1) https://core.telegram.org/method/bots.getPreviewInfo
|
||||
LangCodes []string
|
||||
}
|
||||
|
||||
|
24
vendor/github.com/gotd/td/tg/tl_bots_reorder_preview_medias_gen.go
generated
vendored
24
vendor/github.com/gotd/td/tg/tl_bots_reorder_preview_medias_gen.go
generated
vendored
@ -32,14 +32,21 @@ var (
|
||||
)
|
||||
|
||||
// BotsReorderPreviewMediasRequest represents TL type `bots.reorderPreviewMedias#b627f3aa`.
|
||||
// Reorder a main mini app previews, see here »¹ for more info.
|
||||
// Only owners of bots with a configured Main Mini App can use this method, see see here
|
||||
// »¹ for more info on how to check if you can invoke this method.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
// 2. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.reorderPreviewMedias for reference.
|
||||
type BotsReorderPreviewMediasRequest struct {
|
||||
// Bot field of BotsReorderPreviewMediasRequest.
|
||||
// The bot that owns the Main Mini App.
|
||||
Bot InputUserClass
|
||||
// LangCode field of BotsReorderPreviewMediasRequest.
|
||||
// ISO 639-1 language code, indicating the localization of the previews to reorder.
|
||||
LangCode string
|
||||
// Order field of BotsReorderPreviewMediasRequest.
|
||||
// New order of the previews.
|
||||
Order []InputMediaClass
|
||||
}
|
||||
|
||||
@ -243,6 +250,17 @@ func (r *BotsReorderPreviewMediasRequest) MapOrder() (value InputMediaClassArray
|
||||
}
|
||||
|
||||
// BotsReorderPreviewMedias invokes method bots.reorderPreviewMedias#b627f3aa returning error if any.
|
||||
// Reorder a main mini app previews, see here »¹ for more info.
|
||||
// Only owners of bots with a configured Main Mini App can use this method, see see here
|
||||
// »¹ for more info on how to check if you can invoke this method.
|
||||
//
|
||||
// Links:
|
||||
// 1. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
// 2. https://core.telegram.org/api/bots/webapps#main-mini-app-previews
|
||||
//
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 BOT_INVALID: This is not a valid bot.
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.reorderPreviewMedias for reference.
|
||||
func (c *Client) BotsReorderPreviewMedias(ctx context.Context, request *BotsReorderPreviewMediasRequest) (bool, error) {
|
||||
|
2
vendor/github.com/gotd/td/tg/tl_bots_reorder_usernames_gen.go
generated
vendored
2
vendor/github.com/gotd/td/tg/tl_bots_reorder_usernames_gen.go
generated
vendored
@ -212,9 +212,9 @@ func (r *BotsReorderUsernamesRequest) GetOrder() (value []string) {
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 BOT_INVALID: This is not a valid bot.
|
||||
// 400 USERNAME_NOT_MODIFIED: The username was not modified.
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.reorderUsernames for reference.
|
||||
// Can be used by bots.
|
||||
func (c *Client) BotsReorderUsernames(ctx context.Context, request *BotsReorderUsernamesRequest) (bool, error) {
|
||||
var result BoolBox
|
||||
|
||||
|
1
vendor/github.com/gotd/td/tg/tl_bots_reset_bot_commands_gen.go
generated
vendored
1
vendor/github.com/gotd/td/tg/tl_bots_reset_bot_commands_gen.go
generated
vendored
@ -199,6 +199,7 @@ func (r *BotsResetBotCommandsRequest) GetLangCode() (value string) {
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 LANG_CODE_INVALID: The specified language code is invalid.
|
||||
// 400 USER_BOT_REQUIRED: This method can only be called by a bot.
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.resetBotCommands for reference.
|
||||
// Can be used by bots.
|
||||
|
1
vendor/github.com/gotd/td/tg/tl_bots_send_custom_request_gen.go
generated
vendored
1
vendor/github.com/gotd/td/tg/tl_bots_send_custom_request_gen.go
generated
vendored
@ -196,6 +196,7 @@ func (s *BotsSendCustomRequestRequest) GetParams() (value DataJSON) {
|
||||
// 400 DATA_JSON_INVALID: The provided JSON data is invalid.
|
||||
// 400 METHOD_INVALID: The specified method is invalid.
|
||||
// 403 USER_BOT_INVALID: User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts.
|
||||
// 400 USER_BOT_REQUIRED: This method can only be called by a bot.
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.sendCustomRequest for reference.
|
||||
// Can be used by bots.
|
||||
|
1
vendor/github.com/gotd/td/tg/tl_bots_set_bot_broadcast_default_admin_rights_gen.go
generated
vendored
1
vendor/github.com/gotd/td/tg/tl_bots_set_bot_broadcast_default_admin_rights_gen.go
generated
vendored
@ -177,6 +177,7 @@ func (s *BotsSetBotBroadcastDefaultAdminRightsRequest) GetAdminRights() (value C
|
||||
// Possible errors:
|
||||
//
|
||||
// 400 RIGHTS_NOT_MODIFIED: The new admin rights are equal to the old rights, no change was made.
|
||||
// 400 USER_BOT_REQUIRED: This method can only be called by a bot.
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.setBotBroadcastDefaultAdminRights for reference.
|
||||
// Can be used by bots.
|
||||
|
1
vendor/github.com/gotd/td/tg/tl_bots_set_bot_menu_button_gen.go
generated
vendored
1
vendor/github.com/gotd/td/tg/tl_bots_set_bot_menu_button_gen.go
generated
vendored
@ -211,6 +211,7 @@ func (s *BotsSetBotMenuButtonRequest) GetButton() (value BotMenuButtonClass) {
|
||||
//
|
||||
// 400 BUTTON_TEXT_INVALID: The specified button text is invalid.
|
||||
// 400 BUTTON_URL_INVALID: Button URL invalid.
|
||||
// 400 USER_BOT_REQUIRED: This method can only be called by a bot.
|
||||
//
|
||||
// See https://core.telegram.org/method/bots.setBotMenuButton for reference.
|
||||
// Can be used by bots.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user