diff --git a/internal/_schema/telegram.tl b/_schema/telegram.tl similarity index 100% rename from internal/_schema/telegram.tl rename to _schema/telegram.tl diff --git a/telegram/cmd/gotdcli/main.go b/cmd/gotdecho/main.go similarity index 54% rename from telegram/cmd/gotdcli/main.go rename to cmd/gotdecho/main.go index 6a251877e2..69b99d4c73 100644 --- a/telegram/cmd/gotdcli/main.go +++ b/cmd/gotdecho/main.go @@ -2,6 +2,7 @@ package main import ( "context" + "crypto/rand" "fmt" "os" "strconv" @@ -10,7 +11,9 @@ import ( "go.uber.org/zap/zapcore" "golang.org/x/xerrors" + "github.com/ernado/td/crypto" "github.com/ernado/td/telegram" + "github.com/ernado/td/tg" ) func run(ctx context.Context) error { @@ -50,6 +53,53 @@ func run(ctx context.Context) error { return xerrors.Errorf("failed to init connection: %w", err) } + client.SetUpdateHandler(func(updates *tg.Updates) error { + // This wll be required to send message back. + users := map[int]*tg.User{} + for _, u := range updates.Users { + user, ok := u.(*tg.User) + if !ok { + continue + } + users[user.ID] = user + } + + for _, update := range updates.Updates { + switch u := update.(type) { + case *tg.UpdateNewMessage: + switch m := u.Message.(type) { + case *tg.Message: + switch peer := m.PeerID.(type) { + case *tg.PeerUser: + user := users[peer.UserID] + logger.With( + zap.String("text", m.Message), + zap.Int("user_id", user.ID), + zap.String("user_first_name", user.FirstName), + zap.String("username", user.Username), + ).Info("Got message") + + randomID, err := crypto.RandInt64(rand.Reader) + if err != nil { + return err + } + return client.SendMessage(ctx, &tg.MessagesSendMessageRequest{ + RandomID: randomID, + Message: m.Message, + Peer: &tg.InputPeerUser{ + UserID: user.ID, + AccessHash: user.AccessHash, + }, + }) + } + } + default: + logger.With(zap.String("update_type", fmt.Sprintf("%T", u))).Info("Ignoring update") + } + } + return nil + }) + // Trying to log in as bot. if err := client.BotLogin(ctx, telegram.BotLogin{ ID: appID, @@ -59,7 +109,8 @@ func run(ctx context.Context) error { return xerrors.Errorf("failed to perform bot login: %w", err) } - return nil + // Just reading updates. + select {} } func main() { diff --git a/gen/cmd/gotdgen/main.go b/cmd/gotdgen/main.go similarity index 100% rename from gen/cmd/gotdgen/main.go rename to cmd/gotdgen/main.go diff --git a/internal/crypto/crypto.go b/crypto/crypto.go similarity index 100% rename from internal/crypto/crypto.go rename to crypto/crypto.go diff --git a/internal/crypto/data_with_hash.go b/crypto/data_with_hash.go similarity index 100% rename from internal/crypto/data_with_hash.go rename to crypto/data_with_hash.go diff --git a/internal/crypto/data_with_hash_test.go b/crypto/data_with_hash_test.go similarity index 100% rename from internal/crypto/data_with_hash_test.go rename to crypto/data_with_hash_test.go diff --git a/internal/crypto/dh.go b/crypto/dh.go similarity index 100% rename from internal/crypto/dh.go rename to crypto/dh.go diff --git a/internal/crypto/dh_test.go b/crypto/dh_test.go similarity index 100% rename from internal/crypto/dh_test.go rename to crypto/dh_test.go diff --git a/internal/crypto/int128.go b/crypto/int128.go similarity index 100% rename from internal/crypto/int128.go rename to crypto/int128.go diff --git a/internal/crypto/int256.go b/crypto/int256.go similarity index 100% rename from internal/crypto/int256.go rename to crypto/int256.go diff --git a/internal/crypto/keys.go b/crypto/keys.go similarity index 100% rename from internal/crypto/keys.go rename to crypto/keys.go diff --git a/internal/crypto/keys_test.go b/crypto/keys_test.go similarity index 100% rename from internal/crypto/keys_test.go rename to crypto/keys_test.go diff --git a/internal/crypto/message_id.go b/crypto/message_id.go similarity index 100% rename from internal/crypto/message_id.go rename to crypto/message_id.go diff --git a/internal/crypto/message_id_test.go b/crypto/message_id_test.go similarity index 100% rename from internal/crypto/message_id_test.go rename to crypto/message_id_test.go diff --git a/internal/crypto/pq.go b/crypto/pq.go similarity index 100% rename from internal/crypto/pq.go rename to crypto/pq.go diff --git a/internal/crypto/pq_test.go b/crypto/pq_test.go similarity index 100% rename from internal/crypto/pq_test.go rename to crypto/pq_test.go diff --git a/internal/crypto/public_keys.go b/crypto/public_keys.go similarity index 100% rename from internal/crypto/public_keys.go rename to crypto/public_keys.go diff --git a/internal/crypto/rsa_encrypt.go b/crypto/rsa_encrypt.go similarity index 100% rename from internal/crypto/rsa_encrypt.go rename to crypto/rsa_encrypt.go diff --git a/internal/crypto/rsa_encrypt_test.go b/crypto/rsa_encrypt_test.go similarity index 100% rename from internal/crypto/rsa_encrypt_test.go rename to crypto/rsa_encrypt_test.go diff --git a/internal/crypto/session_id.go b/crypto/session_id.go similarity index 100% rename from internal/crypto/session_id.go rename to crypto/session_id.go diff --git a/internal/crypto/session_id_test.go b/crypto/session_id_test.go similarity index 100% rename from internal/crypto/session_id_test.go rename to crypto/session_id_test.go diff --git a/internal/crypto/temp_keys.go b/crypto/temp_keys.go similarity index 100% rename from internal/crypto/temp_keys.go rename to crypto/temp_keys.go diff --git a/internal/crypto/temp_keys_test.go b/crypto/temp_keys_test.go similarity index 100% rename from internal/crypto/temp_keys_test.go rename to crypto/temp_keys_test.go diff --git a/gen/generate.go b/gen/generate.go index 5766dbb755..03eb544301 100644 --- a/gen/generate.go +++ b/gen/generate.go @@ -6,4 +6,4 @@ package gen // Templates should be first. //go:generate go run github.com/go-bindata/go-bindata/go-bindata -pkg=internal -o=internal/bindata.go -mode=420 -modtime=1 ./_template/... -//go:generate go run github.com/ernado/td/gen/cmd/gotdgen --clean --package td --target example --schema _testdata/example.tl +//go:generate go run github.com/ernado/td/cmd/gotdgen --clean --package td --target example --schema _testdata/example.tl diff --git a/go.mod b/go.mod index 1492826f18..aa778feef9 100644 --- a/go.mod +++ b/go.mod @@ -11,5 +11,6 @@ require ( github.com/sergi/go-diff v1.1.0 // indirect github.com/stretchr/testify v1.6.1 go.uber.org/zap v1.16.0 + golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 ) diff --git a/go.sum b/go.sum index cfbcde6433..63ba0eb666 100644 --- a/go.sum +++ b/go.sum @@ -12,12 +12,12 @@ github.com/go-bindata/go-bindata v3.1.2+incompatible h1:5vjJMVhowQdPzjE1LdxyFF7Y github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNPXu/4= github.com/go-openapi/inflect v0.19.0/go.mod h1:lHpZVlpIQqLyKwJ4N+YSc9hchQy/i12fJykb83CRBH4= +github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/validator v9.31.0+incompatible h1:UA72EPEogEnq76ehGdEDp4Mit+3FDh548oRqwVgNsHA= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= @@ -68,6 +68,8 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae h1:/WDfKMnPU+m5M4xB+6x4kaepxRw6jWvR5iDRdvjHgy8= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/internal/generate.go b/internal/generate.go index 53ada7afeb..9f093c16c2 100644 --- a/internal/generate.go +++ b/internal/generate.go @@ -1,5 +1,3 @@ package internal -//go:generate go run github.com/ernado/td/gen/cmd/gotdgen --clean --package mt --target mt --schema _schema/schema.tl - -//go:generate go run github.com/ernado/td/gen/cmd/gotdgen --clean --package tg --target tg --schema _schema/telegram.tl +//go:generate go run github.com/ernado/td/cmd/gotdgen --clean --package mt --target mt --schema _schema/schema.tl diff --git a/internal/proto/container.go b/internal/proto/container.go index 32aa6bdd85..52789a15a4 100644 --- a/internal/proto/container.go +++ b/internal/proto/container.go @@ -2,7 +2,7 @@ package proto import ( "github.com/ernado/td/bin" - "github.com/ernado/td/internal/crypto" + "github.com/ernado/td/crypto" "golang.org/x/xerrors" ) diff --git a/internal/proto/encrypted_message_data.go b/internal/proto/encrypted_message_data.go index 117a0f4486..8791dd3ce2 100644 --- a/internal/proto/encrypted_message_data.go +++ b/internal/proto/encrypted_message_data.go @@ -1,7 +1,7 @@ package proto import ( - "github.com/ernado/td/internal/crypto" + "github.com/ernado/td/crypto" "github.com/ernado/td/bin" ) diff --git a/internal/proto/encrypted_message_test.go b/internal/proto/encrypted_message_test.go index b68258b950..66269709e6 100644 --- a/internal/proto/encrypted_message_test.go +++ b/internal/proto/encrypted_message_test.go @@ -4,7 +4,7 @@ import ( "math/big" "testing" - "github.com/ernado/td/internal/crypto" + "github.com/ernado/td/crypto" "github.com/ernado/td/bin" ) diff --git a/internal/proto/rpc_result.go b/internal/proto/rpc_result.go index 1f0b672dad..6e1bbf0a07 100644 --- a/internal/proto/rpc_result.go +++ b/internal/proto/rpc_result.go @@ -2,7 +2,7 @@ package proto import ( "github.com/ernado/td/bin" - "github.com/ernado/td/internal/crypto" + "github.com/ernado/td/crypto" ) const ResultTypeID = 0xf35c6d01 diff --git a/internal/proto/unencrypted_message.go b/internal/proto/unencrypted_message.go index be1a6b3647..ec09779945 100644 --- a/internal/proto/unencrypted_message.go +++ b/internal/proto/unencrypted_message.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/ernado/td/bin" - "github.com/ernado/td/internal/crypto" + "github.com/ernado/td/crypto" ) // UnencryptedMessage is plaintext message. diff --git a/td.go b/td.go index 8c8855f666..ee747b44d4 100644 --- a/td.go +++ b/td.go @@ -1,2 +1,4 @@ // Package td implements MTProto encoding and decoding. package td + +//go:generate go run github.com/ernado/td/cmd/gotdgen --clean --package tg --target tg --schema _schema/telegram.tl diff --git a/telegram/bot_login.go b/telegram/bot_login.go index 2b347215a6..fe4cca533a 100644 --- a/telegram/bot_login.go +++ b/telegram/bot_login.go @@ -6,7 +6,7 @@ import ( "golang.org/x/xerrors" "github.com/ernado/td/bin" - "github.com/ernado/td/internal/tg" + "github.com/ernado/td/tg" ) // BotLogin wraps credentials that are required to login as bot. diff --git a/telegram/client.go b/telegram/client.go index 046400fcb4..77336f7647 100644 --- a/telegram/client.go +++ b/telegram/client.go @@ -13,8 +13,9 @@ import ( "golang.org/x/xerrors" "github.com/ernado/td/bin" - "github.com/ernado/td/internal/crypto" + "github.com/ernado/td/crypto" "github.com/ernado/td/internal/proto" + "github.com/ernado/td/tg" ) // Client represents a MTProto client to Telegram. @@ -29,6 +30,8 @@ type Client struct { seq int log *zap.Logger + updateHandler func(u *tg.Updates) error + // callbacks for rpc requests rpcMux sync.Mutex rpc map[crypto.MessageID]func(b *bin.Buffer, rpcErr error) diff --git a/telegram/create_auth_key.go b/telegram/create_auth_key.go index cf9f02cdc3..ccd0b9782a 100644 --- a/telegram/create_auth_key.go +++ b/telegram/create_auth_key.go @@ -14,7 +14,7 @@ import ( "golang.org/x/xerrors" "github.com/ernado/td/bin" - "github.com/ernado/td/internal/crypto" + "github.com/ernado/td/crypto" "github.com/ernado/td/internal/mt" "github.com/ernado/td/internal/proto" ) diff --git a/telegram/decrypt.go b/telegram/decrypt.go index 30a9c44610..4c38fd00e6 100644 --- a/telegram/decrypt.go +++ b/telegram/decrypt.go @@ -9,7 +9,7 @@ import ( "golang.org/x/xerrors" "github.com/ernado/td/bin" - "github.com/ernado/td/internal/crypto" + "github.com/ernado/td/crypto" "github.com/ernado/td/internal/proto" ) diff --git a/telegram/encrypt.go b/telegram/encrypt.go index 0fc2fed45b..437d5af27b 100644 --- a/telegram/encrypt.go +++ b/telegram/encrypt.go @@ -6,7 +6,7 @@ import ( "github.com/ernado/ige" - "github.com/ernado/td/internal/crypto" + "github.com/ernado/td/crypto" "github.com/ernado/td/internal/proto" ) diff --git a/telegram/encrypt_test.go b/telegram/encrypt_test.go index 6fcb7233e9..5c981e52b9 100644 --- a/telegram/encrypt_test.go +++ b/telegram/encrypt_test.go @@ -9,7 +9,7 @@ import ( "go.uber.org/zap" "github.com/ernado/td/bin" - "github.com/ernado/td/internal/crypto" + "github.com/ernado/td/crypto" ) type Zero struct{} diff --git a/telegram/handle_bad_msg.go b/telegram/handle_bad_msg.go index d8f50809a4..57fba8db1b 100644 --- a/telegram/handle_bad_msg.go +++ b/telegram/handle_bad_msg.go @@ -3,7 +3,7 @@ package telegram import ( "fmt" - "github.com/ernado/td/internal/crypto" + "github.com/ernado/td/crypto" "golang.org/x/xerrors" diff --git a/telegram/handle_gzip.go b/telegram/handle_gzip.go new file mode 100644 index 0000000000..30489d7191 --- /dev/null +++ b/telegram/handle_gzip.go @@ -0,0 +1,24 @@ +package telegram + +import ( + "golang.org/x/xerrors" + + "github.com/ernado/td/bin" + "github.com/ernado/td/internal/proto" +) + +func (c *Client) gzip(b *bin.Buffer) (*bin.Buffer, error) { + var content proto.GZIP + if err := content.Decode(b); err != nil { + return nil, xerrors.Errorf("failed to decode: %w", err) + } + return &bin.Buffer{Buf: content.Data}, nil +} + +func (c *Client) handleGZIP(b *bin.Buffer) error { + content, err := c.gzip(b) + if err != nil { + return xerrors.Errorf("failed to unzip: %w", err) + } + return c.handleMessage(content) +} diff --git a/telegram/handle_result.go b/telegram/handle_result.go index 9fc89afaec..6894f25910 100644 --- a/telegram/handle_result.go +++ b/telegram/handle_result.go @@ -37,12 +37,13 @@ func (c *Client) handleResult(b *bin.Buffer) error { return err } if id == proto.GZIPTypeID { - var content proto.GZIP - if err := content.Decode(b); err != nil { - return xerrors.Errorf("failed to decode: %w", err) + content, err := c.gzip(b) + if err != nil { + return xerrors.Errorf("failed to decompres: %w", err) } + // Replacing buffer so callback will deal with uncompressed data. - b = &bin.Buffer{Buf: content.Data} + b = content // Replacing id with inner id if error is compressed for any reason. if id, err = b.PeekID(); err != nil { diff --git a/telegram/handle_updates.go b/telegram/handle_updates.go new file mode 100644 index 0000000000..64bc51f552 --- /dev/null +++ b/telegram/handle_updates.go @@ -0,0 +1,49 @@ +package telegram + +import ( + "fmt" + + "go.uber.org/zap" + "golang.org/x/xerrors" + + "github.com/ernado/td/bin" + "github.com/ernado/td/tg" +) + +func (c *Client) processUpdates(updates tg.UpdatesClass) error { + if c.updateHandler == nil { + // Ignoring. Probably we should ACK. + return nil + } + switch u := updates.(type) { + case *tg.Updates: + go func() { + if c.updateHandler == nil { + return + } + // We should send ACK here. + if err := c.updateHandler(u); err != nil { + c.log.With(zap.Error(err)).Error("Update handler returning error") + } + }() + return nil + default: + c.log.With(zap.String("update_type", fmt.Sprintf("%T", u))).Debug("Ignoring update") + } + return nil +} + +func (c *Client) handleUpdates(b *bin.Buffer) error { + updates, err := tg.DecodeUpdates(b) + if err != nil { + return xerrors.Errorf("failed to decode updates: %w", err) + } + return c.processUpdates(updates) +} + +// SetUpdateHandler sets handler as default update handler. +// +// Provided handler will be called on received update. +func (c *Client) SetUpdateHandler(handler func(u *tg.Updates) error) { + c.updateHandler = handler +} diff --git a/telegram/init_connection.go b/telegram/init_connection.go index 22b9408236..a105610aed 100644 --- a/telegram/init_connection.go +++ b/telegram/init_connection.go @@ -3,7 +3,7 @@ package telegram import ( "context" - "github.com/ernado/td/internal/tg" + "github.com/ernado/td/tg" "go.uber.org/zap" diff --git a/telegram/message_id.go b/telegram/message_id.go index fac575c99c..7b1ae3c2be 100644 --- a/telegram/message_id.go +++ b/telegram/message_id.go @@ -1,6 +1,6 @@ package telegram -import "github.com/ernado/td/internal/crypto" +import "github.com/ernado/td/crypto" func (c *Client) newMessageID() crypto.MessageID { return crypto.NewMessageID(c.clock(), crypto.MessageFromClient) diff --git a/telegram/new_encrypted_msg.go b/telegram/new_encrypted_msg.go index 52c2da5e45..79644744a2 100644 --- a/telegram/new_encrypted_msg.go +++ b/telegram/new_encrypted_msg.go @@ -4,7 +4,7 @@ import ( "go.uber.org/zap" "github.com/ernado/td/bin" - "github.com/ernado/td/internal/crypto" + "github.com/ernado/td/crypto" "github.com/ernado/td/internal/proto" ) diff --git a/telegram/ping.go b/telegram/ping.go index 7557ee2efd..cb2e04e2ec 100644 --- a/telegram/ping.go +++ b/telegram/ping.go @@ -6,7 +6,7 @@ import ( "golang.org/x/xerrors" "github.com/ernado/td/bin" - "github.com/ernado/td/internal/crypto" + "github.com/ernado/td/crypto" ) type pingMessage struct { diff --git a/telegram/read_loop.go b/telegram/read_loop.go index 079f864c9b..83d2e4473d 100644 --- a/telegram/read_loop.go +++ b/telegram/read_loop.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" "io" + "net" "time" "go.uber.org/zap" @@ -13,6 +14,7 @@ import ( "github.com/ernado/td/bin" "github.com/ernado/td/internal/mt" "github.com/ernado/td/internal/proto" + "github.com/ernado/td/tg" ) func (c *Client) handlePong(b *bin.Buffer) error { @@ -59,6 +61,7 @@ func (c *Client) handleMessage(b *bin.Buffer) error { // Empty body. return xerrors.Errorf("failed to determine message type: %w", err) } + c.log.With(zap.String("type_id", fmt.Sprintf("0x%x", id))).Debug("HandleMessage") switch id { case mt.BadMsgNotificationTypeID, mt.BadServerSaltTypeID: return c.handleBadMsg(b) @@ -72,6 +75,10 @@ func (c *Client) handleMessage(b *bin.Buffer) error { return c.handlePong(b) case mt.MsgsAckTypeID: return c.handleAck(b) + case proto.GZIPTypeID: + return c.handleGZIP(b) + case tg.UpdatesTypeID: + return c.handleUpdates(b) default: return c.handleUnknown(b) } @@ -138,12 +145,21 @@ func (c *Client) readLoop(ctx context.Context) { for { err := c.read(ctx, b) if err == nil { - // Reading ok. - log.Debug("Read message") + // Reading ok. ) continue } + if errors.Is(err, io.EOF) { // Nothing was received. + c.log.Debug("EOF") + continue + } + + // Checking for read timeout. + var syscall *net.OpError + if errors.As(err, &syscall) && syscall.Timeout() { + // We call SetReadDeadline so such error is expected. + c.log.Debug("No updates") continue } diff --git a/telegram/rpc.go b/telegram/rpc.go index a5c3dd781c..8478a8c1ff 100644 --- a/telegram/rpc.go +++ b/telegram/rpc.go @@ -4,6 +4,8 @@ import ( "context" "sync" + "go.uber.org/zap" + "golang.org/x/xerrors" "github.com/ernado/td/bin" @@ -12,6 +14,9 @@ import ( func (c *Client) do(ctx context.Context, req bin.Encoder, res bin.Decoder) error { id := c.newMessageID() + log := c.log.With(zap.Int("message_id", int(id))) + log.Debug("Do") + // Creating "done" channel and ensuring that it will be closed before // method returns and only once. done := make(chan struct{}) diff --git a/telegram/send_message.go b/telegram/send_message.go new file mode 100644 index 0000000000..b43bdca95b --- /dev/null +++ b/telegram/send_message.go @@ -0,0 +1,30 @@ +package telegram + +import ( + "context" + + "github.com/ernado/td/bin" + "github.com/ernado/td/tg" +) + +type updatesBox struct { + Updates tg.UpdatesClass +} + +func (u *updatesBox) Decode(b *bin.Buffer) error { + v, err := tg.DecodeUpdates(b) + if err != nil { + return err + } + u.Updates = v + return nil +} + +// SendMessage sends message to peer. +func (c *Client) SendMessage(ctx context.Context, req *tg.MessagesSendMessageRequest) error { + var res updatesBox + if err := c.do(ctx, req, &res); err != nil { + return err + } + return c.processUpdates(res.Updates) +} diff --git a/telegram/vendored_keys.go b/telegram/vendored_keys.go index b807cb6754..beac8a182b 100644 --- a/telegram/vendored_keys.go +++ b/telegram/vendored_keys.go @@ -5,7 +5,7 @@ import ( "golang.org/x/xerrors" - "github.com/ernado/td/internal/crypto" + "github.com/ernado/td/crypto" "github.com/ernado/td/telegram/internal" ) diff --git a/telegram/write.go b/telegram/write.go index 51c1f9ba17..624fc81d2d 100644 --- a/telegram/write.go +++ b/telegram/write.go @@ -2,7 +2,7 @@ package telegram import ( "github.com/ernado/td/bin" - "github.com/ernado/td/internal/crypto" + "github.com/ernado/td/crypto" "github.com/ernado/td/internal/proto" ) diff --git a/tg/tg.go b/tg/tg.go new file mode 100644 index 0000000000..0cefaf761a --- /dev/null +++ b/tg/tg.go @@ -0,0 +1,2 @@ +// Package tg contains generated types from MTProto Telegram API. +package tg diff --git a/internal/tg/tl_account_accept_authorization_gen.go b/tg/tl_account_accept_authorization_gen.go similarity index 100% rename from internal/tg/tl_account_accept_authorization_gen.go rename to tg/tl_account_accept_authorization_gen.go diff --git a/internal/tg/tl_account_authorization_form_gen.go b/tg/tl_account_authorization_form_gen.go similarity index 100% rename from internal/tg/tl_account_authorization_form_gen.go rename to tg/tl_account_authorization_form_gen.go diff --git a/internal/tg/tl_account_authorizations_gen.go b/tg/tl_account_authorizations_gen.go similarity index 100% rename from internal/tg/tl_account_authorizations_gen.go rename to tg/tl_account_authorizations_gen.go diff --git a/internal/tg/tl_account_auto_download_settings_gen.go b/tg/tl_account_auto_download_settings_gen.go similarity index 100% rename from internal/tg/tl_account_auto_download_settings_gen.go rename to tg/tl_account_auto_download_settings_gen.go diff --git a/internal/tg/tl_account_cancel_password_email_gen.go b/tg/tl_account_cancel_password_email_gen.go similarity index 100% rename from internal/tg/tl_account_cancel_password_email_gen.go rename to tg/tl_account_cancel_password_email_gen.go diff --git a/internal/tg/tl_account_change_phone_gen.go b/tg/tl_account_change_phone_gen.go similarity index 100% rename from internal/tg/tl_account_change_phone_gen.go rename to tg/tl_account_change_phone_gen.go diff --git a/internal/tg/tl_account_check_username_gen.go b/tg/tl_account_check_username_gen.go similarity index 100% rename from internal/tg/tl_account_check_username_gen.go rename to tg/tl_account_check_username_gen.go diff --git a/internal/tg/tl_account_confirm_password_email_gen.go b/tg/tl_account_confirm_password_email_gen.go similarity index 100% rename from internal/tg/tl_account_confirm_password_email_gen.go rename to tg/tl_account_confirm_password_email_gen.go diff --git a/internal/tg/tl_account_confirm_phone_gen.go b/tg/tl_account_confirm_phone_gen.go similarity index 100% rename from internal/tg/tl_account_confirm_phone_gen.go rename to tg/tl_account_confirm_phone_gen.go diff --git a/internal/tg/tl_account_content_settings_gen.go b/tg/tl_account_content_settings_gen.go similarity index 100% rename from internal/tg/tl_account_content_settings_gen.go rename to tg/tl_account_content_settings_gen.go diff --git a/internal/tg/tl_account_create_theme_gen.go b/tg/tl_account_create_theme_gen.go similarity index 100% rename from internal/tg/tl_account_create_theme_gen.go rename to tg/tl_account_create_theme_gen.go diff --git a/internal/tg/tl_account_days_ttl_gen.go b/tg/tl_account_days_ttl_gen.go similarity index 100% rename from internal/tg/tl_account_days_ttl_gen.go rename to tg/tl_account_days_ttl_gen.go diff --git a/internal/tg/tl_account_delete_account_gen.go b/tg/tl_account_delete_account_gen.go similarity index 100% rename from internal/tg/tl_account_delete_account_gen.go rename to tg/tl_account_delete_account_gen.go diff --git a/internal/tg/tl_account_delete_secure_value_gen.go b/tg/tl_account_delete_secure_value_gen.go similarity index 100% rename from internal/tg/tl_account_delete_secure_value_gen.go rename to tg/tl_account_delete_secure_value_gen.go diff --git a/internal/tg/tl_account_finish_takeout_session_gen.go b/tg/tl_account_finish_takeout_session_gen.go similarity index 100% rename from internal/tg/tl_account_finish_takeout_session_gen.go rename to tg/tl_account_finish_takeout_session_gen.go diff --git a/internal/tg/tl_account_get_account_ttl_gen.go b/tg/tl_account_get_account_ttl_gen.go similarity index 100% rename from internal/tg/tl_account_get_account_ttl_gen.go rename to tg/tl_account_get_account_ttl_gen.go diff --git a/internal/tg/tl_account_get_all_secure_values_gen.go b/tg/tl_account_get_all_secure_values_gen.go similarity index 100% rename from internal/tg/tl_account_get_all_secure_values_gen.go rename to tg/tl_account_get_all_secure_values_gen.go diff --git a/internal/tg/tl_account_get_authorization_form_gen.go b/tg/tl_account_get_authorization_form_gen.go similarity index 100% rename from internal/tg/tl_account_get_authorization_form_gen.go rename to tg/tl_account_get_authorization_form_gen.go diff --git a/internal/tg/tl_account_get_authorizations_gen.go b/tg/tl_account_get_authorizations_gen.go similarity index 100% rename from internal/tg/tl_account_get_authorizations_gen.go rename to tg/tl_account_get_authorizations_gen.go diff --git a/internal/tg/tl_account_get_auto_download_settings_gen.go b/tg/tl_account_get_auto_download_settings_gen.go similarity index 100% rename from internal/tg/tl_account_get_auto_download_settings_gen.go rename to tg/tl_account_get_auto_download_settings_gen.go diff --git a/internal/tg/tl_account_get_contact_sign_up_notification_gen.go b/tg/tl_account_get_contact_sign_up_notification_gen.go similarity index 100% rename from internal/tg/tl_account_get_contact_sign_up_notification_gen.go rename to tg/tl_account_get_contact_sign_up_notification_gen.go diff --git a/internal/tg/tl_account_get_content_settings_gen.go b/tg/tl_account_get_content_settings_gen.go similarity index 100% rename from internal/tg/tl_account_get_content_settings_gen.go rename to tg/tl_account_get_content_settings_gen.go diff --git a/internal/tg/tl_account_get_global_privacy_settings_gen.go b/tg/tl_account_get_global_privacy_settings_gen.go similarity index 100% rename from internal/tg/tl_account_get_global_privacy_settings_gen.go rename to tg/tl_account_get_global_privacy_settings_gen.go diff --git a/internal/tg/tl_account_get_multi_wall_papers_gen.go b/tg/tl_account_get_multi_wall_papers_gen.go similarity index 100% rename from internal/tg/tl_account_get_multi_wall_papers_gen.go rename to tg/tl_account_get_multi_wall_papers_gen.go diff --git a/internal/tg/tl_account_get_notify_exceptions_gen.go b/tg/tl_account_get_notify_exceptions_gen.go similarity index 100% rename from internal/tg/tl_account_get_notify_exceptions_gen.go rename to tg/tl_account_get_notify_exceptions_gen.go diff --git a/internal/tg/tl_account_get_notify_settings_gen.go b/tg/tl_account_get_notify_settings_gen.go similarity index 100% rename from internal/tg/tl_account_get_notify_settings_gen.go rename to tg/tl_account_get_notify_settings_gen.go diff --git a/internal/tg/tl_account_get_password_gen.go b/tg/tl_account_get_password_gen.go similarity index 100% rename from internal/tg/tl_account_get_password_gen.go rename to tg/tl_account_get_password_gen.go diff --git a/internal/tg/tl_account_get_password_settings_gen.go b/tg/tl_account_get_password_settings_gen.go similarity index 100% rename from internal/tg/tl_account_get_password_settings_gen.go rename to tg/tl_account_get_password_settings_gen.go diff --git a/internal/tg/tl_account_get_privacy_gen.go b/tg/tl_account_get_privacy_gen.go similarity index 100% rename from internal/tg/tl_account_get_privacy_gen.go rename to tg/tl_account_get_privacy_gen.go diff --git a/internal/tg/tl_account_get_secure_value_gen.go b/tg/tl_account_get_secure_value_gen.go similarity index 100% rename from internal/tg/tl_account_get_secure_value_gen.go rename to tg/tl_account_get_secure_value_gen.go diff --git a/internal/tg/tl_account_get_theme_gen.go b/tg/tl_account_get_theme_gen.go similarity index 100% rename from internal/tg/tl_account_get_theme_gen.go rename to tg/tl_account_get_theme_gen.go diff --git a/internal/tg/tl_account_get_themes_gen.go b/tg/tl_account_get_themes_gen.go similarity index 100% rename from internal/tg/tl_account_get_themes_gen.go rename to tg/tl_account_get_themes_gen.go diff --git a/internal/tg/tl_account_get_tmp_password_gen.go b/tg/tl_account_get_tmp_password_gen.go similarity index 100% rename from internal/tg/tl_account_get_tmp_password_gen.go rename to tg/tl_account_get_tmp_password_gen.go diff --git a/internal/tg/tl_account_get_wall_paper_gen.go b/tg/tl_account_get_wall_paper_gen.go similarity index 100% rename from internal/tg/tl_account_get_wall_paper_gen.go rename to tg/tl_account_get_wall_paper_gen.go diff --git a/internal/tg/tl_account_get_wall_papers_gen.go b/tg/tl_account_get_wall_papers_gen.go similarity index 100% rename from internal/tg/tl_account_get_wall_papers_gen.go rename to tg/tl_account_get_wall_papers_gen.go diff --git a/internal/tg/tl_account_get_web_authorizations_gen.go b/tg/tl_account_get_web_authorizations_gen.go similarity index 100% rename from internal/tg/tl_account_get_web_authorizations_gen.go rename to tg/tl_account_get_web_authorizations_gen.go diff --git a/internal/tg/tl_account_init_takeout_session_gen.go b/tg/tl_account_init_takeout_session_gen.go similarity index 100% rename from internal/tg/tl_account_init_takeout_session_gen.go rename to tg/tl_account_init_takeout_session_gen.go diff --git a/internal/tg/tl_account_install_theme_gen.go b/tg/tl_account_install_theme_gen.go similarity index 100% rename from internal/tg/tl_account_install_theme_gen.go rename to tg/tl_account_install_theme_gen.go diff --git a/internal/tg/tl_account_install_wall_paper_gen.go b/tg/tl_account_install_wall_paper_gen.go similarity index 100% rename from internal/tg/tl_account_install_wall_paper_gen.go rename to tg/tl_account_install_wall_paper_gen.go diff --git a/internal/tg/tl_account_password_gen.go b/tg/tl_account_password_gen.go similarity index 100% rename from internal/tg/tl_account_password_gen.go rename to tg/tl_account_password_gen.go diff --git a/internal/tg/tl_account_password_input_settings_gen.go b/tg/tl_account_password_input_settings_gen.go similarity index 100% rename from internal/tg/tl_account_password_input_settings_gen.go rename to tg/tl_account_password_input_settings_gen.go diff --git a/internal/tg/tl_account_password_settings_gen.go b/tg/tl_account_password_settings_gen.go similarity index 100% rename from internal/tg/tl_account_password_settings_gen.go rename to tg/tl_account_password_settings_gen.go diff --git a/internal/tg/tl_account_privacy_rules_gen.go b/tg/tl_account_privacy_rules_gen.go similarity index 100% rename from internal/tg/tl_account_privacy_rules_gen.go rename to tg/tl_account_privacy_rules_gen.go diff --git a/internal/tg/tl_account_register_device_gen.go b/tg/tl_account_register_device_gen.go similarity index 100% rename from internal/tg/tl_account_register_device_gen.go rename to tg/tl_account_register_device_gen.go diff --git a/internal/tg/tl_account_report_peer_gen.go b/tg/tl_account_report_peer_gen.go similarity index 100% rename from internal/tg/tl_account_report_peer_gen.go rename to tg/tl_account_report_peer_gen.go diff --git a/internal/tg/tl_account_resend_password_email_gen.go b/tg/tl_account_resend_password_email_gen.go similarity index 100% rename from internal/tg/tl_account_resend_password_email_gen.go rename to tg/tl_account_resend_password_email_gen.go diff --git a/internal/tg/tl_account_reset_authorization_gen.go b/tg/tl_account_reset_authorization_gen.go similarity index 100% rename from internal/tg/tl_account_reset_authorization_gen.go rename to tg/tl_account_reset_authorization_gen.go diff --git a/internal/tg/tl_account_reset_notify_settings_gen.go b/tg/tl_account_reset_notify_settings_gen.go similarity index 100% rename from internal/tg/tl_account_reset_notify_settings_gen.go rename to tg/tl_account_reset_notify_settings_gen.go diff --git a/internal/tg/tl_account_reset_wall_papers_gen.go b/tg/tl_account_reset_wall_papers_gen.go similarity index 100% rename from internal/tg/tl_account_reset_wall_papers_gen.go rename to tg/tl_account_reset_wall_papers_gen.go diff --git a/internal/tg/tl_account_reset_web_authorization_gen.go b/tg/tl_account_reset_web_authorization_gen.go similarity index 100% rename from internal/tg/tl_account_reset_web_authorization_gen.go rename to tg/tl_account_reset_web_authorization_gen.go diff --git a/internal/tg/tl_account_reset_web_authorizations_gen.go b/tg/tl_account_reset_web_authorizations_gen.go similarity index 100% rename from internal/tg/tl_account_reset_web_authorizations_gen.go rename to tg/tl_account_reset_web_authorizations_gen.go diff --git a/internal/tg/tl_account_save_auto_download_settings_gen.go b/tg/tl_account_save_auto_download_settings_gen.go similarity index 100% rename from internal/tg/tl_account_save_auto_download_settings_gen.go rename to tg/tl_account_save_auto_download_settings_gen.go diff --git a/internal/tg/tl_account_save_secure_value_gen.go b/tg/tl_account_save_secure_value_gen.go similarity index 100% rename from internal/tg/tl_account_save_secure_value_gen.go rename to tg/tl_account_save_secure_value_gen.go diff --git a/internal/tg/tl_account_save_theme_gen.go b/tg/tl_account_save_theme_gen.go similarity index 100% rename from internal/tg/tl_account_save_theme_gen.go rename to tg/tl_account_save_theme_gen.go diff --git a/internal/tg/tl_account_save_wall_paper_gen.go b/tg/tl_account_save_wall_paper_gen.go similarity index 100% rename from internal/tg/tl_account_save_wall_paper_gen.go rename to tg/tl_account_save_wall_paper_gen.go diff --git a/internal/tg/tl_account_send_change_phone_code_gen.go b/tg/tl_account_send_change_phone_code_gen.go similarity index 100% rename from internal/tg/tl_account_send_change_phone_code_gen.go rename to tg/tl_account_send_change_phone_code_gen.go diff --git a/internal/tg/tl_account_send_confirm_phone_code_gen.go b/tg/tl_account_send_confirm_phone_code_gen.go similarity index 100% rename from internal/tg/tl_account_send_confirm_phone_code_gen.go rename to tg/tl_account_send_confirm_phone_code_gen.go diff --git a/internal/tg/tl_account_send_verify_email_code_gen.go b/tg/tl_account_send_verify_email_code_gen.go similarity index 100% rename from internal/tg/tl_account_send_verify_email_code_gen.go rename to tg/tl_account_send_verify_email_code_gen.go diff --git a/internal/tg/tl_account_send_verify_phone_code_gen.go b/tg/tl_account_send_verify_phone_code_gen.go similarity index 100% rename from internal/tg/tl_account_send_verify_phone_code_gen.go rename to tg/tl_account_send_verify_phone_code_gen.go diff --git a/internal/tg/tl_account_sent_email_code_gen.go b/tg/tl_account_sent_email_code_gen.go similarity index 100% rename from internal/tg/tl_account_sent_email_code_gen.go rename to tg/tl_account_sent_email_code_gen.go diff --git a/internal/tg/tl_account_set_account_ttl_gen.go b/tg/tl_account_set_account_ttl_gen.go similarity index 100% rename from internal/tg/tl_account_set_account_ttl_gen.go rename to tg/tl_account_set_account_ttl_gen.go diff --git a/internal/tg/tl_account_set_contact_sign_up_notification_gen.go b/tg/tl_account_set_contact_sign_up_notification_gen.go similarity index 100% rename from internal/tg/tl_account_set_contact_sign_up_notification_gen.go rename to tg/tl_account_set_contact_sign_up_notification_gen.go diff --git a/internal/tg/tl_account_set_content_settings_gen.go b/tg/tl_account_set_content_settings_gen.go similarity index 100% rename from internal/tg/tl_account_set_content_settings_gen.go rename to tg/tl_account_set_content_settings_gen.go diff --git a/internal/tg/tl_account_set_global_privacy_settings_gen.go b/tg/tl_account_set_global_privacy_settings_gen.go similarity index 100% rename from internal/tg/tl_account_set_global_privacy_settings_gen.go rename to tg/tl_account_set_global_privacy_settings_gen.go diff --git a/internal/tg/tl_account_set_privacy_gen.go b/tg/tl_account_set_privacy_gen.go similarity index 100% rename from internal/tg/tl_account_set_privacy_gen.go rename to tg/tl_account_set_privacy_gen.go diff --git a/internal/tg/tl_account_takeout_gen.go b/tg/tl_account_takeout_gen.go similarity index 100% rename from internal/tg/tl_account_takeout_gen.go rename to tg/tl_account_takeout_gen.go diff --git a/internal/tg/tl_account_themes_gen.go b/tg/tl_account_themes_gen.go similarity index 100% rename from internal/tg/tl_account_themes_gen.go rename to tg/tl_account_themes_gen.go diff --git a/internal/tg/tl_account_tmp_password_gen.go b/tg/tl_account_tmp_password_gen.go similarity index 100% rename from internal/tg/tl_account_tmp_password_gen.go rename to tg/tl_account_tmp_password_gen.go diff --git a/internal/tg/tl_account_unregister_device_gen.go b/tg/tl_account_unregister_device_gen.go similarity index 100% rename from internal/tg/tl_account_unregister_device_gen.go rename to tg/tl_account_unregister_device_gen.go diff --git a/internal/tg/tl_account_update_device_locked_gen.go b/tg/tl_account_update_device_locked_gen.go similarity index 100% rename from internal/tg/tl_account_update_device_locked_gen.go rename to tg/tl_account_update_device_locked_gen.go diff --git a/internal/tg/tl_account_update_notify_settings_gen.go b/tg/tl_account_update_notify_settings_gen.go similarity index 100% rename from internal/tg/tl_account_update_notify_settings_gen.go rename to tg/tl_account_update_notify_settings_gen.go diff --git a/internal/tg/tl_account_update_password_settings_gen.go b/tg/tl_account_update_password_settings_gen.go similarity index 100% rename from internal/tg/tl_account_update_password_settings_gen.go rename to tg/tl_account_update_password_settings_gen.go diff --git a/internal/tg/tl_account_update_profile_gen.go b/tg/tl_account_update_profile_gen.go similarity index 100% rename from internal/tg/tl_account_update_profile_gen.go rename to tg/tl_account_update_profile_gen.go diff --git a/internal/tg/tl_account_update_status_gen.go b/tg/tl_account_update_status_gen.go similarity index 100% rename from internal/tg/tl_account_update_status_gen.go rename to tg/tl_account_update_status_gen.go diff --git a/internal/tg/tl_account_update_theme_gen.go b/tg/tl_account_update_theme_gen.go similarity index 100% rename from internal/tg/tl_account_update_theme_gen.go rename to tg/tl_account_update_theme_gen.go diff --git a/internal/tg/tl_account_update_username_gen.go b/tg/tl_account_update_username_gen.go similarity index 100% rename from internal/tg/tl_account_update_username_gen.go rename to tg/tl_account_update_username_gen.go diff --git a/internal/tg/tl_account_upload_theme_gen.go b/tg/tl_account_upload_theme_gen.go similarity index 100% rename from internal/tg/tl_account_upload_theme_gen.go rename to tg/tl_account_upload_theme_gen.go diff --git a/internal/tg/tl_account_upload_wall_paper_gen.go b/tg/tl_account_upload_wall_paper_gen.go similarity index 100% rename from internal/tg/tl_account_upload_wall_paper_gen.go rename to tg/tl_account_upload_wall_paper_gen.go diff --git a/internal/tg/tl_account_verify_email_gen.go b/tg/tl_account_verify_email_gen.go similarity index 100% rename from internal/tg/tl_account_verify_email_gen.go rename to tg/tl_account_verify_email_gen.go diff --git a/internal/tg/tl_account_verify_phone_gen.go b/tg/tl_account_verify_phone_gen.go similarity index 100% rename from internal/tg/tl_account_verify_phone_gen.go rename to tg/tl_account_verify_phone_gen.go diff --git a/internal/tg/tl_account_wall_papers_gen.go b/tg/tl_account_wall_papers_gen.go similarity index 100% rename from internal/tg/tl_account_wall_papers_gen.go rename to tg/tl_account_wall_papers_gen.go diff --git a/internal/tg/tl_account_web_authorizations_gen.go b/tg/tl_account_web_authorizations_gen.go similarity index 100% rename from internal/tg/tl_account_web_authorizations_gen.go rename to tg/tl_account_web_authorizations_gen.go diff --git a/internal/tg/tl_auth_accept_login_token_gen.go b/tg/tl_auth_accept_login_token_gen.go similarity index 100% rename from internal/tg/tl_auth_accept_login_token_gen.go rename to tg/tl_auth_accept_login_token_gen.go diff --git a/internal/tg/tl_auth_authorization_gen.go b/tg/tl_auth_authorization_gen.go similarity index 100% rename from internal/tg/tl_auth_authorization_gen.go rename to tg/tl_auth_authorization_gen.go diff --git a/internal/tg/tl_auth_bind_temp_auth_key_gen.go b/tg/tl_auth_bind_temp_auth_key_gen.go similarity index 100% rename from internal/tg/tl_auth_bind_temp_auth_key_gen.go rename to tg/tl_auth_bind_temp_auth_key_gen.go diff --git a/internal/tg/tl_auth_cancel_code_gen.go b/tg/tl_auth_cancel_code_gen.go similarity index 100% rename from internal/tg/tl_auth_cancel_code_gen.go rename to tg/tl_auth_cancel_code_gen.go diff --git a/internal/tg/tl_auth_check_password_gen.go b/tg/tl_auth_check_password_gen.go similarity index 100% rename from internal/tg/tl_auth_check_password_gen.go rename to tg/tl_auth_check_password_gen.go diff --git a/internal/tg/tl_auth_code_type_gen.go b/tg/tl_auth_code_type_gen.go similarity index 100% rename from internal/tg/tl_auth_code_type_gen.go rename to tg/tl_auth_code_type_gen.go diff --git a/internal/tg/tl_auth_drop_temp_auth_keys_gen.go b/tg/tl_auth_drop_temp_auth_keys_gen.go similarity index 100% rename from internal/tg/tl_auth_drop_temp_auth_keys_gen.go rename to tg/tl_auth_drop_temp_auth_keys_gen.go diff --git a/internal/tg/tl_auth_export_authorization_gen.go b/tg/tl_auth_export_authorization_gen.go similarity index 100% rename from internal/tg/tl_auth_export_authorization_gen.go rename to tg/tl_auth_export_authorization_gen.go diff --git a/internal/tg/tl_auth_export_login_token_gen.go b/tg/tl_auth_export_login_token_gen.go similarity index 100% rename from internal/tg/tl_auth_export_login_token_gen.go rename to tg/tl_auth_export_login_token_gen.go diff --git a/internal/tg/tl_auth_exported_authorization_gen.go b/tg/tl_auth_exported_authorization_gen.go similarity index 100% rename from internal/tg/tl_auth_exported_authorization_gen.go rename to tg/tl_auth_exported_authorization_gen.go diff --git a/internal/tg/tl_auth_import_authorization_gen.go b/tg/tl_auth_import_authorization_gen.go similarity index 100% rename from internal/tg/tl_auth_import_authorization_gen.go rename to tg/tl_auth_import_authorization_gen.go diff --git a/internal/tg/tl_auth_import_bot_authorization_gen.go b/tg/tl_auth_import_bot_authorization_gen.go similarity index 100% rename from internal/tg/tl_auth_import_bot_authorization_gen.go rename to tg/tl_auth_import_bot_authorization_gen.go diff --git a/internal/tg/tl_auth_import_login_token_gen.go b/tg/tl_auth_import_login_token_gen.go similarity index 100% rename from internal/tg/tl_auth_import_login_token_gen.go rename to tg/tl_auth_import_login_token_gen.go diff --git a/internal/tg/tl_auth_log_out_gen.go b/tg/tl_auth_log_out_gen.go similarity index 100% rename from internal/tg/tl_auth_log_out_gen.go rename to tg/tl_auth_log_out_gen.go diff --git a/internal/tg/tl_auth_login_token_gen.go b/tg/tl_auth_login_token_gen.go similarity index 100% rename from internal/tg/tl_auth_login_token_gen.go rename to tg/tl_auth_login_token_gen.go diff --git a/internal/tg/tl_auth_password_recovery_gen.go b/tg/tl_auth_password_recovery_gen.go similarity index 100% rename from internal/tg/tl_auth_password_recovery_gen.go rename to tg/tl_auth_password_recovery_gen.go diff --git a/internal/tg/tl_auth_recover_password_gen.go b/tg/tl_auth_recover_password_gen.go similarity index 100% rename from internal/tg/tl_auth_recover_password_gen.go rename to tg/tl_auth_recover_password_gen.go diff --git a/internal/tg/tl_auth_request_password_recovery_gen.go b/tg/tl_auth_request_password_recovery_gen.go similarity index 100% rename from internal/tg/tl_auth_request_password_recovery_gen.go rename to tg/tl_auth_request_password_recovery_gen.go diff --git a/internal/tg/tl_auth_resend_code_gen.go b/tg/tl_auth_resend_code_gen.go similarity index 100% rename from internal/tg/tl_auth_resend_code_gen.go rename to tg/tl_auth_resend_code_gen.go diff --git a/internal/tg/tl_auth_reset_authorizations_gen.go b/tg/tl_auth_reset_authorizations_gen.go similarity index 100% rename from internal/tg/tl_auth_reset_authorizations_gen.go rename to tg/tl_auth_reset_authorizations_gen.go diff --git a/internal/tg/tl_auth_send_code_gen.go b/tg/tl_auth_send_code_gen.go similarity index 100% rename from internal/tg/tl_auth_send_code_gen.go rename to tg/tl_auth_send_code_gen.go diff --git a/internal/tg/tl_auth_sent_code_gen.go b/tg/tl_auth_sent_code_gen.go similarity index 100% rename from internal/tg/tl_auth_sent_code_gen.go rename to tg/tl_auth_sent_code_gen.go diff --git a/internal/tg/tl_auth_sent_code_type_gen.go b/tg/tl_auth_sent_code_type_gen.go similarity index 100% rename from internal/tg/tl_auth_sent_code_type_gen.go rename to tg/tl_auth_sent_code_type_gen.go diff --git a/internal/tg/tl_auth_sign_in_gen.go b/tg/tl_auth_sign_in_gen.go similarity index 100% rename from internal/tg/tl_auth_sign_in_gen.go rename to tg/tl_auth_sign_in_gen.go diff --git a/internal/tg/tl_auth_sign_up_gen.go b/tg/tl_auth_sign_up_gen.go similarity index 100% rename from internal/tg/tl_auth_sign_up_gen.go rename to tg/tl_auth_sign_up_gen.go diff --git a/internal/tg/tl_authorization_gen.go b/tg/tl_authorization_gen.go similarity index 100% rename from internal/tg/tl_authorization_gen.go rename to tg/tl_authorization_gen.go diff --git a/internal/tg/tl_auto_download_settings_gen.go b/tg/tl_auto_download_settings_gen.go similarity index 100% rename from internal/tg/tl_auto_download_settings_gen.go rename to tg/tl_auto_download_settings_gen.go diff --git a/internal/tg/tl_bank_card_open_url_gen.go b/tg/tl_bank_card_open_url_gen.go similarity index 100% rename from internal/tg/tl_bank_card_open_url_gen.go rename to tg/tl_bank_card_open_url_gen.go diff --git a/internal/tg/tl_base_theme_gen.go b/tg/tl_base_theme_gen.go similarity index 100% rename from internal/tg/tl_base_theme_gen.go rename to tg/tl_base_theme_gen.go diff --git a/internal/tg/tl_bool_gen.go b/tg/tl_bool_gen.go similarity index 100% rename from internal/tg/tl_bool_gen.go rename to tg/tl_bool_gen.go diff --git a/internal/tg/tl_bot_command_gen.go b/tg/tl_bot_command_gen.go similarity index 100% rename from internal/tg/tl_bot_command_gen.go rename to tg/tl_bot_command_gen.go diff --git a/internal/tg/tl_bot_info_gen.go b/tg/tl_bot_info_gen.go similarity index 100% rename from internal/tg/tl_bot_info_gen.go rename to tg/tl_bot_info_gen.go diff --git a/internal/tg/tl_bot_inline_message_gen.go b/tg/tl_bot_inline_message_gen.go similarity index 100% rename from internal/tg/tl_bot_inline_message_gen.go rename to tg/tl_bot_inline_message_gen.go diff --git a/internal/tg/tl_bot_inline_result_gen.go b/tg/tl_bot_inline_result_gen.go similarity index 100% rename from internal/tg/tl_bot_inline_result_gen.go rename to tg/tl_bot_inline_result_gen.go diff --git a/internal/tg/tl_bots_answer_webhook_json_query_gen.go b/tg/tl_bots_answer_webhook_json_query_gen.go similarity index 100% rename from internal/tg/tl_bots_answer_webhook_json_query_gen.go rename to tg/tl_bots_answer_webhook_json_query_gen.go diff --git a/internal/tg/tl_bots_send_custom_request_gen.go b/tg/tl_bots_send_custom_request_gen.go similarity index 100% rename from internal/tg/tl_bots_send_custom_request_gen.go rename to tg/tl_bots_send_custom_request_gen.go diff --git a/internal/tg/tl_bots_set_bot_commands_gen.go b/tg/tl_bots_set_bot_commands_gen.go similarity index 100% rename from internal/tg/tl_bots_set_bot_commands_gen.go rename to tg/tl_bots_set_bot_commands_gen.go diff --git a/internal/tg/tl_cdn_config_gen.go b/tg/tl_cdn_config_gen.go similarity index 100% rename from internal/tg/tl_cdn_config_gen.go rename to tg/tl_cdn_config_gen.go diff --git a/internal/tg/tl_cdn_public_key_gen.go b/tg/tl_cdn_public_key_gen.go similarity index 100% rename from internal/tg/tl_cdn_public_key_gen.go rename to tg/tl_cdn_public_key_gen.go diff --git a/internal/tg/tl_channel_admin_log_event_action_gen.go b/tg/tl_channel_admin_log_event_action_gen.go similarity index 100% rename from internal/tg/tl_channel_admin_log_event_action_gen.go rename to tg/tl_channel_admin_log_event_action_gen.go diff --git a/internal/tg/tl_channel_admin_log_event_gen.go b/tg/tl_channel_admin_log_event_gen.go similarity index 100% rename from internal/tg/tl_channel_admin_log_event_gen.go rename to tg/tl_channel_admin_log_event_gen.go diff --git a/internal/tg/tl_channel_admin_log_events_filter_gen.go b/tg/tl_channel_admin_log_events_filter_gen.go similarity index 100% rename from internal/tg/tl_channel_admin_log_events_filter_gen.go rename to tg/tl_channel_admin_log_events_filter_gen.go diff --git a/internal/tg/tl_channel_location_gen.go b/tg/tl_channel_location_gen.go similarity index 100% rename from internal/tg/tl_channel_location_gen.go rename to tg/tl_channel_location_gen.go diff --git a/internal/tg/tl_channel_messages_filter_gen.go b/tg/tl_channel_messages_filter_gen.go similarity index 100% rename from internal/tg/tl_channel_messages_filter_gen.go rename to tg/tl_channel_messages_filter_gen.go diff --git a/internal/tg/tl_channel_participant_gen.go b/tg/tl_channel_participant_gen.go similarity index 100% rename from internal/tg/tl_channel_participant_gen.go rename to tg/tl_channel_participant_gen.go diff --git a/internal/tg/tl_channel_participants_filter_gen.go b/tg/tl_channel_participants_filter_gen.go similarity index 100% rename from internal/tg/tl_channel_participants_filter_gen.go rename to tg/tl_channel_participants_filter_gen.go diff --git a/internal/tg/tl_channels_admin_log_results_gen.go b/tg/tl_channels_admin_log_results_gen.go similarity index 100% rename from internal/tg/tl_channels_admin_log_results_gen.go rename to tg/tl_channels_admin_log_results_gen.go diff --git a/internal/tg/tl_channels_channel_participant_gen.go b/tg/tl_channels_channel_participant_gen.go similarity index 100% rename from internal/tg/tl_channels_channel_participant_gen.go rename to tg/tl_channels_channel_participant_gen.go diff --git a/internal/tg/tl_channels_channel_participants_gen.go b/tg/tl_channels_channel_participants_gen.go similarity index 100% rename from internal/tg/tl_channels_channel_participants_gen.go rename to tg/tl_channels_channel_participants_gen.go diff --git a/internal/tg/tl_channels_check_username_gen.go b/tg/tl_channels_check_username_gen.go similarity index 100% rename from internal/tg/tl_channels_check_username_gen.go rename to tg/tl_channels_check_username_gen.go diff --git a/internal/tg/tl_channels_create_channel_gen.go b/tg/tl_channels_create_channel_gen.go similarity index 100% rename from internal/tg/tl_channels_create_channel_gen.go rename to tg/tl_channels_create_channel_gen.go diff --git a/internal/tg/tl_channels_delete_channel_gen.go b/tg/tl_channels_delete_channel_gen.go similarity index 100% rename from internal/tg/tl_channels_delete_channel_gen.go rename to tg/tl_channels_delete_channel_gen.go diff --git a/internal/tg/tl_channels_delete_history_gen.go b/tg/tl_channels_delete_history_gen.go similarity index 100% rename from internal/tg/tl_channels_delete_history_gen.go rename to tg/tl_channels_delete_history_gen.go diff --git a/internal/tg/tl_channels_delete_messages_gen.go b/tg/tl_channels_delete_messages_gen.go similarity index 100% rename from internal/tg/tl_channels_delete_messages_gen.go rename to tg/tl_channels_delete_messages_gen.go diff --git a/internal/tg/tl_channels_delete_user_history_gen.go b/tg/tl_channels_delete_user_history_gen.go similarity index 100% rename from internal/tg/tl_channels_delete_user_history_gen.go rename to tg/tl_channels_delete_user_history_gen.go diff --git a/internal/tg/tl_channels_edit_admin_gen.go b/tg/tl_channels_edit_admin_gen.go similarity index 100% rename from internal/tg/tl_channels_edit_admin_gen.go rename to tg/tl_channels_edit_admin_gen.go diff --git a/internal/tg/tl_channels_edit_banned_gen.go b/tg/tl_channels_edit_banned_gen.go similarity index 100% rename from internal/tg/tl_channels_edit_banned_gen.go rename to tg/tl_channels_edit_banned_gen.go diff --git a/internal/tg/tl_channels_edit_creator_gen.go b/tg/tl_channels_edit_creator_gen.go similarity index 100% rename from internal/tg/tl_channels_edit_creator_gen.go rename to tg/tl_channels_edit_creator_gen.go diff --git a/internal/tg/tl_channels_edit_location_gen.go b/tg/tl_channels_edit_location_gen.go similarity index 100% rename from internal/tg/tl_channels_edit_location_gen.go rename to tg/tl_channels_edit_location_gen.go diff --git a/internal/tg/tl_channels_edit_photo_gen.go b/tg/tl_channels_edit_photo_gen.go similarity index 100% rename from internal/tg/tl_channels_edit_photo_gen.go rename to tg/tl_channels_edit_photo_gen.go diff --git a/internal/tg/tl_channels_edit_title_gen.go b/tg/tl_channels_edit_title_gen.go similarity index 100% rename from internal/tg/tl_channels_edit_title_gen.go rename to tg/tl_channels_edit_title_gen.go diff --git a/internal/tg/tl_channels_export_message_link_gen.go b/tg/tl_channels_export_message_link_gen.go similarity index 100% rename from internal/tg/tl_channels_export_message_link_gen.go rename to tg/tl_channels_export_message_link_gen.go diff --git a/internal/tg/tl_channels_get_admin_log_gen.go b/tg/tl_channels_get_admin_log_gen.go similarity index 100% rename from internal/tg/tl_channels_get_admin_log_gen.go rename to tg/tl_channels_get_admin_log_gen.go diff --git a/internal/tg/tl_channels_get_admined_public_channels_gen.go b/tg/tl_channels_get_admined_public_channels_gen.go similarity index 100% rename from internal/tg/tl_channels_get_admined_public_channels_gen.go rename to tg/tl_channels_get_admined_public_channels_gen.go diff --git a/internal/tg/tl_channels_get_channels_gen.go b/tg/tl_channels_get_channels_gen.go similarity index 100% rename from internal/tg/tl_channels_get_channels_gen.go rename to tg/tl_channels_get_channels_gen.go diff --git a/internal/tg/tl_channels_get_full_channel_gen.go b/tg/tl_channels_get_full_channel_gen.go similarity index 100% rename from internal/tg/tl_channels_get_full_channel_gen.go rename to tg/tl_channels_get_full_channel_gen.go diff --git a/internal/tg/tl_channels_get_groups_for_discussion_gen.go b/tg/tl_channels_get_groups_for_discussion_gen.go similarity index 100% rename from internal/tg/tl_channels_get_groups_for_discussion_gen.go rename to tg/tl_channels_get_groups_for_discussion_gen.go diff --git a/internal/tg/tl_channels_get_inactive_channels_gen.go b/tg/tl_channels_get_inactive_channels_gen.go similarity index 100% rename from internal/tg/tl_channels_get_inactive_channels_gen.go rename to tg/tl_channels_get_inactive_channels_gen.go diff --git a/internal/tg/tl_channels_get_left_channels_gen.go b/tg/tl_channels_get_left_channels_gen.go similarity index 100% rename from internal/tg/tl_channels_get_left_channels_gen.go rename to tg/tl_channels_get_left_channels_gen.go diff --git a/internal/tg/tl_channels_get_messages_gen.go b/tg/tl_channels_get_messages_gen.go similarity index 100% rename from internal/tg/tl_channels_get_messages_gen.go rename to tg/tl_channels_get_messages_gen.go diff --git a/internal/tg/tl_channels_get_participant_gen.go b/tg/tl_channels_get_participant_gen.go similarity index 100% rename from internal/tg/tl_channels_get_participant_gen.go rename to tg/tl_channels_get_participant_gen.go diff --git a/internal/tg/tl_channels_get_participants_gen.go b/tg/tl_channels_get_participants_gen.go similarity index 100% rename from internal/tg/tl_channels_get_participants_gen.go rename to tg/tl_channels_get_participants_gen.go diff --git a/internal/tg/tl_channels_invite_to_channel_gen.go b/tg/tl_channels_invite_to_channel_gen.go similarity index 100% rename from internal/tg/tl_channels_invite_to_channel_gen.go rename to tg/tl_channels_invite_to_channel_gen.go diff --git a/internal/tg/tl_channels_join_channel_gen.go b/tg/tl_channels_join_channel_gen.go similarity index 100% rename from internal/tg/tl_channels_join_channel_gen.go rename to tg/tl_channels_join_channel_gen.go diff --git a/internal/tg/tl_channels_leave_channel_gen.go b/tg/tl_channels_leave_channel_gen.go similarity index 100% rename from internal/tg/tl_channels_leave_channel_gen.go rename to tg/tl_channels_leave_channel_gen.go diff --git a/internal/tg/tl_channels_read_history_gen.go b/tg/tl_channels_read_history_gen.go similarity index 100% rename from internal/tg/tl_channels_read_history_gen.go rename to tg/tl_channels_read_history_gen.go diff --git a/internal/tg/tl_channels_read_message_contents_gen.go b/tg/tl_channels_read_message_contents_gen.go similarity index 100% rename from internal/tg/tl_channels_read_message_contents_gen.go rename to tg/tl_channels_read_message_contents_gen.go diff --git a/internal/tg/tl_channels_report_spam_gen.go b/tg/tl_channels_report_spam_gen.go similarity index 100% rename from internal/tg/tl_channels_report_spam_gen.go rename to tg/tl_channels_report_spam_gen.go diff --git a/internal/tg/tl_channels_set_discussion_group_gen.go b/tg/tl_channels_set_discussion_group_gen.go similarity index 100% rename from internal/tg/tl_channels_set_discussion_group_gen.go rename to tg/tl_channels_set_discussion_group_gen.go diff --git a/internal/tg/tl_channels_set_stickers_gen.go b/tg/tl_channels_set_stickers_gen.go similarity index 100% rename from internal/tg/tl_channels_set_stickers_gen.go rename to tg/tl_channels_set_stickers_gen.go diff --git a/internal/tg/tl_channels_toggle_pre_history_hidden_gen.go b/tg/tl_channels_toggle_pre_history_hidden_gen.go similarity index 100% rename from internal/tg/tl_channels_toggle_pre_history_hidden_gen.go rename to tg/tl_channels_toggle_pre_history_hidden_gen.go diff --git a/internal/tg/tl_channels_toggle_signatures_gen.go b/tg/tl_channels_toggle_signatures_gen.go similarity index 100% rename from internal/tg/tl_channels_toggle_signatures_gen.go rename to tg/tl_channels_toggle_signatures_gen.go diff --git a/internal/tg/tl_channels_toggle_slow_mode_gen.go b/tg/tl_channels_toggle_slow_mode_gen.go similarity index 100% rename from internal/tg/tl_channels_toggle_slow_mode_gen.go rename to tg/tl_channels_toggle_slow_mode_gen.go diff --git a/internal/tg/tl_channels_update_username_gen.go b/tg/tl_channels_update_username_gen.go similarity index 100% rename from internal/tg/tl_channels_update_username_gen.go rename to tg/tl_channels_update_username_gen.go diff --git a/internal/tg/tl_chat_admin_rights_gen.go b/tg/tl_chat_admin_rights_gen.go similarity index 100% rename from internal/tg/tl_chat_admin_rights_gen.go rename to tg/tl_chat_admin_rights_gen.go diff --git a/internal/tg/tl_chat_banned_rights_gen.go b/tg/tl_chat_banned_rights_gen.go similarity index 100% rename from internal/tg/tl_chat_banned_rights_gen.go rename to tg/tl_chat_banned_rights_gen.go diff --git a/internal/tg/tl_chat_full_gen.go b/tg/tl_chat_full_gen.go similarity index 100% rename from internal/tg/tl_chat_full_gen.go rename to tg/tl_chat_full_gen.go diff --git a/internal/tg/tl_chat_gen.go b/tg/tl_chat_gen.go similarity index 100% rename from internal/tg/tl_chat_gen.go rename to tg/tl_chat_gen.go diff --git a/internal/tg/tl_chat_invite_gen.go b/tg/tl_chat_invite_gen.go similarity index 100% rename from internal/tg/tl_chat_invite_gen.go rename to tg/tl_chat_invite_gen.go diff --git a/internal/tg/tl_chat_onlines_gen.go b/tg/tl_chat_onlines_gen.go similarity index 100% rename from internal/tg/tl_chat_onlines_gen.go rename to tg/tl_chat_onlines_gen.go diff --git a/internal/tg/tl_chat_participant_gen.go b/tg/tl_chat_participant_gen.go similarity index 100% rename from internal/tg/tl_chat_participant_gen.go rename to tg/tl_chat_participant_gen.go diff --git a/internal/tg/tl_chat_participants_gen.go b/tg/tl_chat_participants_gen.go similarity index 100% rename from internal/tg/tl_chat_participants_gen.go rename to tg/tl_chat_participants_gen.go diff --git a/internal/tg/tl_chat_photo_gen.go b/tg/tl_chat_photo_gen.go similarity index 100% rename from internal/tg/tl_chat_photo_gen.go rename to tg/tl_chat_photo_gen.go diff --git a/internal/tg/tl_code_settings_gen.go b/tg/tl_code_settings_gen.go similarity index 100% rename from internal/tg/tl_code_settings_gen.go rename to tg/tl_code_settings_gen.go diff --git a/internal/tg/tl_config_gen.go b/tg/tl_config_gen.go similarity index 100% rename from internal/tg/tl_config_gen.go rename to tg/tl_config_gen.go diff --git a/internal/tg/tl_contact_gen.go b/tg/tl_contact_gen.go similarity index 100% rename from internal/tg/tl_contact_gen.go rename to tg/tl_contact_gen.go diff --git a/internal/tg/tl_contact_status_gen.go b/tg/tl_contact_status_gen.go similarity index 100% rename from internal/tg/tl_contact_status_gen.go rename to tg/tl_contact_status_gen.go diff --git a/internal/tg/tl_contacts_accept_contact_gen.go b/tg/tl_contacts_accept_contact_gen.go similarity index 100% rename from internal/tg/tl_contacts_accept_contact_gen.go rename to tg/tl_contacts_accept_contact_gen.go diff --git a/internal/tg/tl_contacts_add_contact_gen.go b/tg/tl_contacts_add_contact_gen.go similarity index 100% rename from internal/tg/tl_contacts_add_contact_gen.go rename to tg/tl_contacts_add_contact_gen.go diff --git a/internal/tg/tl_contacts_block_from_replies_gen.go b/tg/tl_contacts_block_from_replies_gen.go similarity index 100% rename from internal/tg/tl_contacts_block_from_replies_gen.go rename to tg/tl_contacts_block_from_replies_gen.go diff --git a/internal/tg/tl_contacts_block_gen.go b/tg/tl_contacts_block_gen.go similarity index 100% rename from internal/tg/tl_contacts_block_gen.go rename to tg/tl_contacts_block_gen.go diff --git a/internal/tg/tl_contacts_blocked_gen.go b/tg/tl_contacts_blocked_gen.go similarity index 100% rename from internal/tg/tl_contacts_blocked_gen.go rename to tg/tl_contacts_blocked_gen.go diff --git a/internal/tg/tl_contacts_contacts_gen.go b/tg/tl_contacts_contacts_gen.go similarity index 100% rename from internal/tg/tl_contacts_contacts_gen.go rename to tg/tl_contacts_contacts_gen.go diff --git a/internal/tg/tl_contacts_delete_by_phones_gen.go b/tg/tl_contacts_delete_by_phones_gen.go similarity index 100% rename from internal/tg/tl_contacts_delete_by_phones_gen.go rename to tg/tl_contacts_delete_by_phones_gen.go diff --git a/internal/tg/tl_contacts_delete_contacts_gen.go b/tg/tl_contacts_delete_contacts_gen.go similarity index 100% rename from internal/tg/tl_contacts_delete_contacts_gen.go rename to tg/tl_contacts_delete_contacts_gen.go diff --git a/internal/tg/tl_contacts_found_gen.go b/tg/tl_contacts_found_gen.go similarity index 100% rename from internal/tg/tl_contacts_found_gen.go rename to tg/tl_contacts_found_gen.go diff --git a/internal/tg/tl_contacts_get_blocked_gen.go b/tg/tl_contacts_get_blocked_gen.go similarity index 100% rename from internal/tg/tl_contacts_get_blocked_gen.go rename to tg/tl_contacts_get_blocked_gen.go diff --git a/internal/tg/tl_contacts_get_contact_ids_gen.go b/tg/tl_contacts_get_contact_ids_gen.go similarity index 100% rename from internal/tg/tl_contacts_get_contact_ids_gen.go rename to tg/tl_contacts_get_contact_ids_gen.go diff --git a/internal/tg/tl_contacts_get_contacts_gen.go b/tg/tl_contacts_get_contacts_gen.go similarity index 100% rename from internal/tg/tl_contacts_get_contacts_gen.go rename to tg/tl_contacts_get_contacts_gen.go diff --git a/internal/tg/tl_contacts_get_located_gen.go b/tg/tl_contacts_get_located_gen.go similarity index 100% rename from internal/tg/tl_contacts_get_located_gen.go rename to tg/tl_contacts_get_located_gen.go diff --git a/internal/tg/tl_contacts_get_saved_gen.go b/tg/tl_contacts_get_saved_gen.go similarity index 100% rename from internal/tg/tl_contacts_get_saved_gen.go rename to tg/tl_contacts_get_saved_gen.go diff --git a/internal/tg/tl_contacts_get_statuses_gen.go b/tg/tl_contacts_get_statuses_gen.go similarity index 100% rename from internal/tg/tl_contacts_get_statuses_gen.go rename to tg/tl_contacts_get_statuses_gen.go diff --git a/internal/tg/tl_contacts_get_top_peers_gen.go b/tg/tl_contacts_get_top_peers_gen.go similarity index 100% rename from internal/tg/tl_contacts_get_top_peers_gen.go rename to tg/tl_contacts_get_top_peers_gen.go diff --git a/internal/tg/tl_contacts_import_contacts_gen.go b/tg/tl_contacts_import_contacts_gen.go similarity index 100% rename from internal/tg/tl_contacts_import_contacts_gen.go rename to tg/tl_contacts_import_contacts_gen.go diff --git a/internal/tg/tl_contacts_imported_contacts_gen.go b/tg/tl_contacts_imported_contacts_gen.go similarity index 100% rename from internal/tg/tl_contacts_imported_contacts_gen.go rename to tg/tl_contacts_imported_contacts_gen.go diff --git a/internal/tg/tl_contacts_reset_saved_gen.go b/tg/tl_contacts_reset_saved_gen.go similarity index 100% rename from internal/tg/tl_contacts_reset_saved_gen.go rename to tg/tl_contacts_reset_saved_gen.go diff --git a/internal/tg/tl_contacts_reset_top_peer_rating_gen.go b/tg/tl_contacts_reset_top_peer_rating_gen.go similarity index 100% rename from internal/tg/tl_contacts_reset_top_peer_rating_gen.go rename to tg/tl_contacts_reset_top_peer_rating_gen.go diff --git a/internal/tg/tl_contacts_resolve_username_gen.go b/tg/tl_contacts_resolve_username_gen.go similarity index 100% rename from internal/tg/tl_contacts_resolve_username_gen.go rename to tg/tl_contacts_resolve_username_gen.go diff --git a/internal/tg/tl_contacts_resolved_peer_gen.go b/tg/tl_contacts_resolved_peer_gen.go similarity index 100% rename from internal/tg/tl_contacts_resolved_peer_gen.go rename to tg/tl_contacts_resolved_peer_gen.go diff --git a/internal/tg/tl_contacts_search_gen.go b/tg/tl_contacts_search_gen.go similarity index 100% rename from internal/tg/tl_contacts_search_gen.go rename to tg/tl_contacts_search_gen.go diff --git a/internal/tg/tl_contacts_toggle_top_peers_gen.go b/tg/tl_contacts_toggle_top_peers_gen.go similarity index 100% rename from internal/tg/tl_contacts_toggle_top_peers_gen.go rename to tg/tl_contacts_toggle_top_peers_gen.go diff --git a/internal/tg/tl_contacts_top_peers_gen.go b/tg/tl_contacts_top_peers_gen.go similarity index 100% rename from internal/tg/tl_contacts_top_peers_gen.go rename to tg/tl_contacts_top_peers_gen.go diff --git a/internal/tg/tl_contacts_unblock_gen.go b/tg/tl_contacts_unblock_gen.go similarity index 100% rename from internal/tg/tl_contacts_unblock_gen.go rename to tg/tl_contacts_unblock_gen.go diff --git a/internal/tg/tl_data_json_gen.go b/tg/tl_data_json_gen.go similarity index 100% rename from internal/tg/tl_data_json_gen.go rename to tg/tl_data_json_gen.go diff --git a/internal/tg/tl_dc_option_gen.go b/tg/tl_dc_option_gen.go similarity index 100% rename from internal/tg/tl_dc_option_gen.go rename to tg/tl_dc_option_gen.go diff --git a/internal/tg/tl_dialog_filter_gen.go b/tg/tl_dialog_filter_gen.go similarity index 100% rename from internal/tg/tl_dialog_filter_gen.go rename to tg/tl_dialog_filter_gen.go diff --git a/internal/tg/tl_dialog_filter_suggested_gen.go b/tg/tl_dialog_filter_suggested_gen.go similarity index 100% rename from internal/tg/tl_dialog_filter_suggested_gen.go rename to tg/tl_dialog_filter_suggested_gen.go diff --git a/internal/tg/tl_dialog_gen.go b/tg/tl_dialog_gen.go similarity index 100% rename from internal/tg/tl_dialog_gen.go rename to tg/tl_dialog_gen.go diff --git a/internal/tg/tl_dialog_peer_gen.go b/tg/tl_dialog_peer_gen.go similarity index 100% rename from internal/tg/tl_dialog_peer_gen.go rename to tg/tl_dialog_peer_gen.go diff --git a/internal/tg/tl_document_attribute_gen.go b/tg/tl_document_attribute_gen.go similarity index 100% rename from internal/tg/tl_document_attribute_gen.go rename to tg/tl_document_attribute_gen.go diff --git a/internal/tg/tl_document_gen.go b/tg/tl_document_gen.go similarity index 100% rename from internal/tg/tl_document_gen.go rename to tg/tl_document_gen.go diff --git a/internal/tg/tl_draft_message_gen.go b/tg/tl_draft_message_gen.go similarity index 100% rename from internal/tg/tl_draft_message_gen.go rename to tg/tl_draft_message_gen.go diff --git a/internal/tg/tl_emoji_keyword_gen.go b/tg/tl_emoji_keyword_gen.go similarity index 100% rename from internal/tg/tl_emoji_keyword_gen.go rename to tg/tl_emoji_keyword_gen.go diff --git a/internal/tg/tl_emoji_keywords_difference_gen.go b/tg/tl_emoji_keywords_difference_gen.go similarity index 100% rename from internal/tg/tl_emoji_keywords_difference_gen.go rename to tg/tl_emoji_keywords_difference_gen.go diff --git a/internal/tg/tl_emoji_language_gen.go b/tg/tl_emoji_language_gen.go similarity index 100% rename from internal/tg/tl_emoji_language_gen.go rename to tg/tl_emoji_language_gen.go diff --git a/internal/tg/tl_emoji_url_gen.go b/tg/tl_emoji_url_gen.go similarity index 100% rename from internal/tg/tl_emoji_url_gen.go rename to tg/tl_emoji_url_gen.go diff --git a/internal/tg/tl_encrypted_chat_gen.go b/tg/tl_encrypted_chat_gen.go similarity index 100% rename from internal/tg/tl_encrypted_chat_gen.go rename to tg/tl_encrypted_chat_gen.go diff --git a/internal/tg/tl_encrypted_file_gen.go b/tg/tl_encrypted_file_gen.go similarity index 100% rename from internal/tg/tl_encrypted_file_gen.go rename to tg/tl_encrypted_file_gen.go diff --git a/internal/tg/tl_encrypted_message_gen.go b/tg/tl_encrypted_message_gen.go similarity index 100% rename from internal/tg/tl_encrypted_message_gen.go rename to tg/tl_encrypted_message_gen.go diff --git a/internal/tg/tl_error_gen.go b/tg/tl_error_gen.go similarity index 100% rename from internal/tg/tl_error_gen.go rename to tg/tl_error_gen.go diff --git a/internal/tg/tl_exported_chat_invite_gen.go b/tg/tl_exported_chat_invite_gen.go similarity index 100% rename from internal/tg/tl_exported_chat_invite_gen.go rename to tg/tl_exported_chat_invite_gen.go diff --git a/internal/tg/tl_exported_message_link_gen.go b/tg/tl_exported_message_link_gen.go similarity index 100% rename from internal/tg/tl_exported_message_link_gen.go rename to tg/tl_exported_message_link_gen.go diff --git a/internal/tg/tl_file_hash_gen.go b/tg/tl_file_hash_gen.go similarity index 100% rename from internal/tg/tl_file_hash_gen.go rename to tg/tl_file_hash_gen.go diff --git a/internal/tg/tl_file_location_to_be_deprecated_gen.go b/tg/tl_file_location_to_be_deprecated_gen.go similarity index 100% rename from internal/tg/tl_file_location_to_be_deprecated_gen.go rename to tg/tl_file_location_to_be_deprecated_gen.go diff --git a/internal/tg/tl_folder_gen.go b/tg/tl_folder_gen.go similarity index 100% rename from internal/tg/tl_folder_gen.go rename to tg/tl_folder_gen.go diff --git a/internal/tg/tl_folder_peer_gen.go b/tg/tl_folder_peer_gen.go similarity index 100% rename from internal/tg/tl_folder_peer_gen.go rename to tg/tl_folder_peer_gen.go diff --git a/internal/tg/tl_folders_delete_folder_gen.go b/tg/tl_folders_delete_folder_gen.go similarity index 100% rename from internal/tg/tl_folders_delete_folder_gen.go rename to tg/tl_folders_delete_folder_gen.go diff --git a/internal/tg/tl_folders_edit_peer_folders_gen.go b/tg/tl_folders_edit_peer_folders_gen.go similarity index 100% rename from internal/tg/tl_folders_edit_peer_folders_gen.go rename to tg/tl_folders_edit_peer_folders_gen.go diff --git a/internal/tg/tl_game_gen.go b/tg/tl_game_gen.go similarity index 100% rename from internal/tg/tl_game_gen.go rename to tg/tl_game_gen.go diff --git a/internal/tg/tl_geo_point_gen.go b/tg/tl_geo_point_gen.go similarity index 100% rename from internal/tg/tl_geo_point_gen.go rename to tg/tl_geo_point_gen.go diff --git a/internal/tg/tl_global_privacy_settings_gen.go b/tg/tl_global_privacy_settings_gen.go similarity index 100% rename from internal/tg/tl_global_privacy_settings_gen.go rename to tg/tl_global_privacy_settings_gen.go diff --git a/internal/tg/tl_help_accept_terms_of_service_gen.go b/tg/tl_help_accept_terms_of_service_gen.go similarity index 100% rename from internal/tg/tl_help_accept_terms_of_service_gen.go rename to tg/tl_help_accept_terms_of_service_gen.go diff --git a/internal/tg/tl_help_app_update_gen.go b/tg/tl_help_app_update_gen.go similarity index 100% rename from internal/tg/tl_help_app_update_gen.go rename to tg/tl_help_app_update_gen.go diff --git a/internal/tg/tl_help_countries_list_gen.go b/tg/tl_help_countries_list_gen.go similarity index 100% rename from internal/tg/tl_help_countries_list_gen.go rename to tg/tl_help_countries_list_gen.go diff --git a/internal/tg/tl_help_country_code_gen.go b/tg/tl_help_country_code_gen.go similarity index 100% rename from internal/tg/tl_help_country_code_gen.go rename to tg/tl_help_country_code_gen.go diff --git a/internal/tg/tl_help_country_gen.go b/tg/tl_help_country_gen.go similarity index 100% rename from internal/tg/tl_help_country_gen.go rename to tg/tl_help_country_gen.go diff --git a/internal/tg/tl_help_deep_link_info_gen.go b/tg/tl_help_deep_link_info_gen.go similarity index 100% rename from internal/tg/tl_help_deep_link_info_gen.go rename to tg/tl_help_deep_link_info_gen.go diff --git a/internal/tg/tl_help_dismiss_suggestion_gen.go b/tg/tl_help_dismiss_suggestion_gen.go similarity index 100% rename from internal/tg/tl_help_dismiss_suggestion_gen.go rename to tg/tl_help_dismiss_suggestion_gen.go diff --git a/internal/tg/tl_help_edit_user_info_gen.go b/tg/tl_help_edit_user_info_gen.go similarity index 100% rename from internal/tg/tl_help_edit_user_info_gen.go rename to tg/tl_help_edit_user_info_gen.go diff --git a/internal/tg/tl_help_get_app_changelog_gen.go b/tg/tl_help_get_app_changelog_gen.go similarity index 100% rename from internal/tg/tl_help_get_app_changelog_gen.go rename to tg/tl_help_get_app_changelog_gen.go diff --git a/internal/tg/tl_help_get_app_config_gen.go b/tg/tl_help_get_app_config_gen.go similarity index 100% rename from internal/tg/tl_help_get_app_config_gen.go rename to tg/tl_help_get_app_config_gen.go diff --git a/internal/tg/tl_help_get_app_update_gen.go b/tg/tl_help_get_app_update_gen.go similarity index 100% rename from internal/tg/tl_help_get_app_update_gen.go rename to tg/tl_help_get_app_update_gen.go diff --git a/internal/tg/tl_help_get_cdn_config_gen.go b/tg/tl_help_get_cdn_config_gen.go similarity index 100% rename from internal/tg/tl_help_get_cdn_config_gen.go rename to tg/tl_help_get_cdn_config_gen.go diff --git a/internal/tg/tl_help_get_config_gen.go b/tg/tl_help_get_config_gen.go similarity index 100% rename from internal/tg/tl_help_get_config_gen.go rename to tg/tl_help_get_config_gen.go diff --git a/internal/tg/tl_help_get_countries_list_gen.go b/tg/tl_help_get_countries_list_gen.go similarity index 100% rename from internal/tg/tl_help_get_countries_list_gen.go rename to tg/tl_help_get_countries_list_gen.go diff --git a/internal/tg/tl_help_get_deep_link_info_gen.go b/tg/tl_help_get_deep_link_info_gen.go similarity index 100% rename from internal/tg/tl_help_get_deep_link_info_gen.go rename to tg/tl_help_get_deep_link_info_gen.go diff --git a/internal/tg/tl_help_get_invite_text_gen.go b/tg/tl_help_get_invite_text_gen.go similarity index 100% rename from internal/tg/tl_help_get_invite_text_gen.go rename to tg/tl_help_get_invite_text_gen.go diff --git a/internal/tg/tl_help_get_nearest_dc_gen.go b/tg/tl_help_get_nearest_dc_gen.go similarity index 100% rename from internal/tg/tl_help_get_nearest_dc_gen.go rename to tg/tl_help_get_nearest_dc_gen.go diff --git a/internal/tg/tl_help_get_passport_config_gen.go b/tg/tl_help_get_passport_config_gen.go similarity index 100% rename from internal/tg/tl_help_get_passport_config_gen.go rename to tg/tl_help_get_passport_config_gen.go diff --git a/internal/tg/tl_help_get_promo_data_gen.go b/tg/tl_help_get_promo_data_gen.go similarity index 100% rename from internal/tg/tl_help_get_promo_data_gen.go rename to tg/tl_help_get_promo_data_gen.go diff --git a/internal/tg/tl_help_get_recent_me_urls_gen.go b/tg/tl_help_get_recent_me_urls_gen.go similarity index 100% rename from internal/tg/tl_help_get_recent_me_urls_gen.go rename to tg/tl_help_get_recent_me_urls_gen.go diff --git a/internal/tg/tl_help_get_support_gen.go b/tg/tl_help_get_support_gen.go similarity index 100% rename from internal/tg/tl_help_get_support_gen.go rename to tg/tl_help_get_support_gen.go diff --git a/internal/tg/tl_help_get_support_name_gen.go b/tg/tl_help_get_support_name_gen.go similarity index 100% rename from internal/tg/tl_help_get_support_name_gen.go rename to tg/tl_help_get_support_name_gen.go diff --git a/internal/tg/tl_help_get_terms_of_service_update_gen.go b/tg/tl_help_get_terms_of_service_update_gen.go similarity index 100% rename from internal/tg/tl_help_get_terms_of_service_update_gen.go rename to tg/tl_help_get_terms_of_service_update_gen.go diff --git a/internal/tg/tl_help_get_user_info_gen.go b/tg/tl_help_get_user_info_gen.go similarity index 100% rename from internal/tg/tl_help_get_user_info_gen.go rename to tg/tl_help_get_user_info_gen.go diff --git a/internal/tg/tl_help_hide_promo_data_gen.go b/tg/tl_help_hide_promo_data_gen.go similarity index 100% rename from internal/tg/tl_help_hide_promo_data_gen.go rename to tg/tl_help_hide_promo_data_gen.go diff --git a/internal/tg/tl_help_invite_text_gen.go b/tg/tl_help_invite_text_gen.go similarity index 100% rename from internal/tg/tl_help_invite_text_gen.go rename to tg/tl_help_invite_text_gen.go diff --git a/internal/tg/tl_help_passport_config_gen.go b/tg/tl_help_passport_config_gen.go similarity index 100% rename from internal/tg/tl_help_passport_config_gen.go rename to tg/tl_help_passport_config_gen.go diff --git a/internal/tg/tl_help_promo_data_gen.go b/tg/tl_help_promo_data_gen.go similarity index 100% rename from internal/tg/tl_help_promo_data_gen.go rename to tg/tl_help_promo_data_gen.go diff --git a/internal/tg/tl_help_recent_me_urls_gen.go b/tg/tl_help_recent_me_urls_gen.go similarity index 100% rename from internal/tg/tl_help_recent_me_urls_gen.go rename to tg/tl_help_recent_me_urls_gen.go diff --git a/internal/tg/tl_help_save_app_log_gen.go b/tg/tl_help_save_app_log_gen.go similarity index 100% rename from internal/tg/tl_help_save_app_log_gen.go rename to tg/tl_help_save_app_log_gen.go diff --git a/internal/tg/tl_help_set_bot_updates_status_gen.go b/tg/tl_help_set_bot_updates_status_gen.go similarity index 100% rename from internal/tg/tl_help_set_bot_updates_status_gen.go rename to tg/tl_help_set_bot_updates_status_gen.go diff --git a/internal/tg/tl_help_support_gen.go b/tg/tl_help_support_gen.go similarity index 100% rename from internal/tg/tl_help_support_gen.go rename to tg/tl_help_support_gen.go diff --git a/internal/tg/tl_help_support_name_gen.go b/tg/tl_help_support_name_gen.go similarity index 100% rename from internal/tg/tl_help_support_name_gen.go rename to tg/tl_help_support_name_gen.go diff --git a/internal/tg/tl_help_terms_of_service_gen.go b/tg/tl_help_terms_of_service_gen.go similarity index 100% rename from internal/tg/tl_help_terms_of_service_gen.go rename to tg/tl_help_terms_of_service_gen.go diff --git a/internal/tg/tl_help_terms_of_service_update_gen.go b/tg/tl_help_terms_of_service_update_gen.go similarity index 100% rename from internal/tg/tl_help_terms_of_service_update_gen.go rename to tg/tl_help_terms_of_service_update_gen.go diff --git a/internal/tg/tl_help_user_info_gen.go b/tg/tl_help_user_info_gen.go similarity index 100% rename from internal/tg/tl_help_user_info_gen.go rename to tg/tl_help_user_info_gen.go diff --git a/internal/tg/tl_high_score_gen.go b/tg/tl_high_score_gen.go similarity index 100% rename from internal/tg/tl_high_score_gen.go rename to tg/tl_high_score_gen.go diff --git a/internal/tg/tl_imported_contact_gen.go b/tg/tl_imported_contact_gen.go similarity index 100% rename from internal/tg/tl_imported_contact_gen.go rename to tg/tl_imported_contact_gen.go diff --git a/internal/tg/tl_inline_bot_switch_p_m_gen.go b/tg/tl_inline_bot_switch_p_m_gen.go similarity index 100% rename from internal/tg/tl_inline_bot_switch_p_m_gen.go rename to tg/tl_inline_bot_switch_p_m_gen.go diff --git a/internal/tg/tl_input_app_event_gen.go b/tg/tl_input_app_event_gen.go similarity index 100% rename from internal/tg/tl_input_app_event_gen.go rename to tg/tl_input_app_event_gen.go diff --git a/internal/tg/tl_input_bot_inline_message_gen.go b/tg/tl_input_bot_inline_message_gen.go similarity index 100% rename from internal/tg/tl_input_bot_inline_message_gen.go rename to tg/tl_input_bot_inline_message_gen.go diff --git a/internal/tg/tl_input_bot_inline_message_id_gen.go b/tg/tl_input_bot_inline_message_id_gen.go similarity index 100% rename from internal/tg/tl_input_bot_inline_message_id_gen.go rename to tg/tl_input_bot_inline_message_id_gen.go diff --git a/internal/tg/tl_input_bot_inline_result_gen.go b/tg/tl_input_bot_inline_result_gen.go similarity index 100% rename from internal/tg/tl_input_bot_inline_result_gen.go rename to tg/tl_input_bot_inline_result_gen.go diff --git a/internal/tg/tl_input_channel_gen.go b/tg/tl_input_channel_gen.go similarity index 100% rename from internal/tg/tl_input_channel_gen.go rename to tg/tl_input_channel_gen.go diff --git a/internal/tg/tl_input_chat_photo_gen.go b/tg/tl_input_chat_photo_gen.go similarity index 100% rename from internal/tg/tl_input_chat_photo_gen.go rename to tg/tl_input_chat_photo_gen.go diff --git a/internal/tg/tl_input_check_password_s_r_p_gen.go b/tg/tl_input_check_password_s_r_p_gen.go similarity index 100% rename from internal/tg/tl_input_check_password_s_r_p_gen.go rename to tg/tl_input_check_password_s_r_p_gen.go diff --git a/internal/tg/tl_input_client_proxy_gen.go b/tg/tl_input_client_proxy_gen.go similarity index 100% rename from internal/tg/tl_input_client_proxy_gen.go rename to tg/tl_input_client_proxy_gen.go diff --git a/internal/tg/tl_input_dialog_peer_gen.go b/tg/tl_input_dialog_peer_gen.go similarity index 100% rename from internal/tg/tl_input_dialog_peer_gen.go rename to tg/tl_input_dialog_peer_gen.go diff --git a/internal/tg/tl_input_document_gen.go b/tg/tl_input_document_gen.go similarity index 100% rename from internal/tg/tl_input_document_gen.go rename to tg/tl_input_document_gen.go diff --git a/internal/tg/tl_input_encrypted_chat_gen.go b/tg/tl_input_encrypted_chat_gen.go similarity index 100% rename from internal/tg/tl_input_encrypted_chat_gen.go rename to tg/tl_input_encrypted_chat_gen.go diff --git a/internal/tg/tl_input_encrypted_file_gen.go b/tg/tl_input_encrypted_file_gen.go similarity index 100% rename from internal/tg/tl_input_encrypted_file_gen.go rename to tg/tl_input_encrypted_file_gen.go diff --git a/internal/tg/tl_input_file_gen.go b/tg/tl_input_file_gen.go similarity index 100% rename from internal/tg/tl_input_file_gen.go rename to tg/tl_input_file_gen.go diff --git a/internal/tg/tl_input_file_location_gen.go b/tg/tl_input_file_location_gen.go similarity index 100% rename from internal/tg/tl_input_file_location_gen.go rename to tg/tl_input_file_location_gen.go diff --git a/internal/tg/tl_input_folder_peer_gen.go b/tg/tl_input_folder_peer_gen.go similarity index 100% rename from internal/tg/tl_input_folder_peer_gen.go rename to tg/tl_input_folder_peer_gen.go diff --git a/internal/tg/tl_input_game_gen.go b/tg/tl_input_game_gen.go similarity index 100% rename from internal/tg/tl_input_game_gen.go rename to tg/tl_input_game_gen.go diff --git a/internal/tg/tl_input_geo_point_gen.go b/tg/tl_input_geo_point_gen.go similarity index 100% rename from internal/tg/tl_input_geo_point_gen.go rename to tg/tl_input_geo_point_gen.go diff --git a/internal/tg/tl_input_media_gen.go b/tg/tl_input_media_gen.go similarity index 100% rename from internal/tg/tl_input_media_gen.go rename to tg/tl_input_media_gen.go diff --git a/internal/tg/tl_input_message_gen.go b/tg/tl_input_message_gen.go similarity index 100% rename from internal/tg/tl_input_message_gen.go rename to tg/tl_input_message_gen.go diff --git a/internal/tg/tl_input_notify_peer_gen.go b/tg/tl_input_notify_peer_gen.go similarity index 100% rename from internal/tg/tl_input_notify_peer_gen.go rename to tg/tl_input_notify_peer_gen.go diff --git a/internal/tg/tl_input_payment_credentials_gen.go b/tg/tl_input_payment_credentials_gen.go similarity index 100% rename from internal/tg/tl_input_payment_credentials_gen.go rename to tg/tl_input_payment_credentials_gen.go diff --git a/internal/tg/tl_input_peer_gen.go b/tg/tl_input_peer_gen.go similarity index 100% rename from internal/tg/tl_input_peer_gen.go rename to tg/tl_input_peer_gen.go diff --git a/internal/tg/tl_input_peer_notify_settings_gen.go b/tg/tl_input_peer_notify_settings_gen.go similarity index 100% rename from internal/tg/tl_input_peer_notify_settings_gen.go rename to tg/tl_input_peer_notify_settings_gen.go diff --git a/internal/tg/tl_input_phone_call_gen.go b/tg/tl_input_phone_call_gen.go similarity index 100% rename from internal/tg/tl_input_phone_call_gen.go rename to tg/tl_input_phone_call_gen.go diff --git a/internal/tg/tl_input_phone_contact_gen.go b/tg/tl_input_phone_contact_gen.go similarity index 100% rename from internal/tg/tl_input_phone_contact_gen.go rename to tg/tl_input_phone_contact_gen.go diff --git a/internal/tg/tl_input_photo_gen.go b/tg/tl_input_photo_gen.go similarity index 100% rename from internal/tg/tl_input_photo_gen.go rename to tg/tl_input_photo_gen.go diff --git a/internal/tg/tl_input_privacy_key_gen.go b/tg/tl_input_privacy_key_gen.go similarity index 100% rename from internal/tg/tl_input_privacy_key_gen.go rename to tg/tl_input_privacy_key_gen.go diff --git a/internal/tg/tl_input_privacy_rule_gen.go b/tg/tl_input_privacy_rule_gen.go similarity index 100% rename from internal/tg/tl_input_privacy_rule_gen.go rename to tg/tl_input_privacy_rule_gen.go diff --git a/internal/tg/tl_input_secure_file_gen.go b/tg/tl_input_secure_file_gen.go similarity index 100% rename from internal/tg/tl_input_secure_file_gen.go rename to tg/tl_input_secure_file_gen.go diff --git a/internal/tg/tl_input_secure_value_gen.go b/tg/tl_input_secure_value_gen.go similarity index 100% rename from internal/tg/tl_input_secure_value_gen.go rename to tg/tl_input_secure_value_gen.go diff --git a/internal/tg/tl_input_single_media_gen.go b/tg/tl_input_single_media_gen.go similarity index 100% rename from internal/tg/tl_input_single_media_gen.go rename to tg/tl_input_single_media_gen.go diff --git a/internal/tg/tl_input_sticker_set_gen.go b/tg/tl_input_sticker_set_gen.go similarity index 100% rename from internal/tg/tl_input_sticker_set_gen.go rename to tg/tl_input_sticker_set_gen.go diff --git a/internal/tg/tl_input_sticker_set_item_gen.go b/tg/tl_input_sticker_set_item_gen.go similarity index 100% rename from internal/tg/tl_input_sticker_set_item_gen.go rename to tg/tl_input_sticker_set_item_gen.go diff --git a/internal/tg/tl_input_stickered_media_gen.go b/tg/tl_input_stickered_media_gen.go similarity index 100% rename from internal/tg/tl_input_stickered_media_gen.go rename to tg/tl_input_stickered_media_gen.go diff --git a/internal/tg/tl_input_theme_gen.go b/tg/tl_input_theme_gen.go similarity index 100% rename from internal/tg/tl_input_theme_gen.go rename to tg/tl_input_theme_gen.go diff --git a/internal/tg/tl_input_theme_settings_gen.go b/tg/tl_input_theme_settings_gen.go similarity index 100% rename from internal/tg/tl_input_theme_settings_gen.go rename to tg/tl_input_theme_settings_gen.go diff --git a/internal/tg/tl_input_user_gen.go b/tg/tl_input_user_gen.go similarity index 100% rename from internal/tg/tl_input_user_gen.go rename to tg/tl_input_user_gen.go diff --git a/internal/tg/tl_input_wall_paper_gen.go b/tg/tl_input_wall_paper_gen.go similarity index 100% rename from internal/tg/tl_input_wall_paper_gen.go rename to tg/tl_input_wall_paper_gen.go diff --git a/internal/tg/tl_input_web_document_gen.go b/tg/tl_input_web_document_gen.go similarity index 100% rename from internal/tg/tl_input_web_document_gen.go rename to tg/tl_input_web_document_gen.go diff --git a/internal/tg/tl_input_web_file_location_gen.go b/tg/tl_input_web_file_location_gen.go similarity index 100% rename from internal/tg/tl_input_web_file_location_gen.go rename to tg/tl_input_web_file_location_gen.go diff --git a/internal/tg/tl_invoice_gen.go b/tg/tl_invoice_gen.go similarity index 100% rename from internal/tg/tl_invoice_gen.go rename to tg/tl_invoice_gen.go diff --git a/internal/tg/tl_json_object_value_gen.go b/tg/tl_json_object_value_gen.go similarity index 100% rename from internal/tg/tl_json_object_value_gen.go rename to tg/tl_json_object_value_gen.go diff --git a/internal/tg/tl_json_value_gen.go b/tg/tl_json_value_gen.go similarity index 100% rename from internal/tg/tl_json_value_gen.go rename to tg/tl_json_value_gen.go diff --git a/internal/tg/tl_keyboard_button_gen.go b/tg/tl_keyboard_button_gen.go similarity index 100% rename from internal/tg/tl_keyboard_button_gen.go rename to tg/tl_keyboard_button_gen.go diff --git a/internal/tg/tl_keyboard_button_row_gen.go b/tg/tl_keyboard_button_row_gen.go similarity index 100% rename from internal/tg/tl_keyboard_button_row_gen.go rename to tg/tl_keyboard_button_row_gen.go diff --git a/internal/tg/tl_labeled_price_gen.go b/tg/tl_labeled_price_gen.go similarity index 100% rename from internal/tg/tl_labeled_price_gen.go rename to tg/tl_labeled_price_gen.go diff --git a/internal/tg/tl_lang_pack_difference_gen.go b/tg/tl_lang_pack_difference_gen.go similarity index 100% rename from internal/tg/tl_lang_pack_difference_gen.go rename to tg/tl_lang_pack_difference_gen.go diff --git a/internal/tg/tl_lang_pack_language_gen.go b/tg/tl_lang_pack_language_gen.go similarity index 100% rename from internal/tg/tl_lang_pack_language_gen.go rename to tg/tl_lang_pack_language_gen.go diff --git a/internal/tg/tl_lang_pack_string_gen.go b/tg/tl_lang_pack_string_gen.go similarity index 100% rename from internal/tg/tl_lang_pack_string_gen.go rename to tg/tl_lang_pack_string_gen.go diff --git a/internal/tg/tl_langpack_get_difference_gen.go b/tg/tl_langpack_get_difference_gen.go similarity index 100% rename from internal/tg/tl_langpack_get_difference_gen.go rename to tg/tl_langpack_get_difference_gen.go diff --git a/internal/tg/tl_langpack_get_lang_pack_gen.go b/tg/tl_langpack_get_lang_pack_gen.go similarity index 100% rename from internal/tg/tl_langpack_get_lang_pack_gen.go rename to tg/tl_langpack_get_lang_pack_gen.go diff --git a/internal/tg/tl_langpack_get_language_gen.go b/tg/tl_langpack_get_language_gen.go similarity index 100% rename from internal/tg/tl_langpack_get_language_gen.go rename to tg/tl_langpack_get_language_gen.go diff --git a/internal/tg/tl_langpack_get_languages_gen.go b/tg/tl_langpack_get_languages_gen.go similarity index 100% rename from internal/tg/tl_langpack_get_languages_gen.go rename to tg/tl_langpack_get_languages_gen.go diff --git a/internal/tg/tl_langpack_get_strings_gen.go b/tg/tl_langpack_get_strings_gen.go similarity index 100% rename from internal/tg/tl_langpack_get_strings_gen.go rename to tg/tl_langpack_get_strings_gen.go diff --git a/internal/tg/tl_mask_coords_gen.go b/tg/tl_mask_coords_gen.go similarity index 100% rename from internal/tg/tl_mask_coords_gen.go rename to tg/tl_mask_coords_gen.go diff --git a/internal/tg/tl_message_action_gen.go b/tg/tl_message_action_gen.go similarity index 100% rename from internal/tg/tl_message_action_gen.go rename to tg/tl_message_action_gen.go diff --git a/internal/tg/tl_message_entity_gen.go b/tg/tl_message_entity_gen.go similarity index 100% rename from internal/tg/tl_message_entity_gen.go rename to tg/tl_message_entity_gen.go diff --git a/internal/tg/tl_message_fwd_header_gen.go b/tg/tl_message_fwd_header_gen.go similarity index 100% rename from internal/tg/tl_message_fwd_header_gen.go rename to tg/tl_message_fwd_header_gen.go diff --git a/internal/tg/tl_message_gen.go b/tg/tl_message_gen.go similarity index 100% rename from internal/tg/tl_message_gen.go rename to tg/tl_message_gen.go diff --git a/internal/tg/tl_message_interaction_counters_gen.go b/tg/tl_message_interaction_counters_gen.go similarity index 100% rename from internal/tg/tl_message_interaction_counters_gen.go rename to tg/tl_message_interaction_counters_gen.go diff --git a/internal/tg/tl_message_media_gen.go b/tg/tl_message_media_gen.go similarity index 100% rename from internal/tg/tl_message_media_gen.go rename to tg/tl_message_media_gen.go diff --git a/internal/tg/tl_message_range_gen.go b/tg/tl_message_range_gen.go similarity index 100% rename from internal/tg/tl_message_range_gen.go rename to tg/tl_message_range_gen.go diff --git a/internal/tg/tl_message_replies_gen.go b/tg/tl_message_replies_gen.go similarity index 100% rename from internal/tg/tl_message_replies_gen.go rename to tg/tl_message_replies_gen.go diff --git a/internal/tg/tl_message_reply_header_gen.go b/tg/tl_message_reply_header_gen.go similarity index 100% rename from internal/tg/tl_message_reply_header_gen.go rename to tg/tl_message_reply_header_gen.go diff --git a/internal/tg/tl_message_user_vote_gen.go b/tg/tl_message_user_vote_gen.go similarity index 100% rename from internal/tg/tl_message_user_vote_gen.go rename to tg/tl_message_user_vote_gen.go diff --git a/internal/tg/tl_message_views_gen.go b/tg/tl_message_views_gen.go similarity index 100% rename from internal/tg/tl_message_views_gen.go rename to tg/tl_message_views_gen.go diff --git a/internal/tg/tl_messages_accept_encryption_gen.go b/tg/tl_messages_accept_encryption_gen.go similarity index 100% rename from internal/tg/tl_messages_accept_encryption_gen.go rename to tg/tl_messages_accept_encryption_gen.go diff --git a/internal/tg/tl_messages_accept_url_auth_gen.go b/tg/tl_messages_accept_url_auth_gen.go similarity index 100% rename from internal/tg/tl_messages_accept_url_auth_gen.go rename to tg/tl_messages_accept_url_auth_gen.go diff --git a/internal/tg/tl_messages_add_chat_user_gen.go b/tg/tl_messages_add_chat_user_gen.go similarity index 100% rename from internal/tg/tl_messages_add_chat_user_gen.go rename to tg/tl_messages_add_chat_user_gen.go diff --git a/internal/tg/tl_messages_affected_history_gen.go b/tg/tl_messages_affected_history_gen.go similarity index 100% rename from internal/tg/tl_messages_affected_history_gen.go rename to tg/tl_messages_affected_history_gen.go diff --git a/internal/tg/tl_messages_affected_messages_gen.go b/tg/tl_messages_affected_messages_gen.go similarity index 100% rename from internal/tg/tl_messages_affected_messages_gen.go rename to tg/tl_messages_affected_messages_gen.go diff --git a/internal/tg/tl_messages_all_stickers_gen.go b/tg/tl_messages_all_stickers_gen.go similarity index 100% rename from internal/tg/tl_messages_all_stickers_gen.go rename to tg/tl_messages_all_stickers_gen.go diff --git a/internal/tg/tl_messages_archived_stickers_gen.go b/tg/tl_messages_archived_stickers_gen.go similarity index 100% rename from internal/tg/tl_messages_archived_stickers_gen.go rename to tg/tl_messages_archived_stickers_gen.go diff --git a/internal/tg/tl_messages_bot_callback_answer_gen.go b/tg/tl_messages_bot_callback_answer_gen.go similarity index 100% rename from internal/tg/tl_messages_bot_callback_answer_gen.go rename to tg/tl_messages_bot_callback_answer_gen.go diff --git a/internal/tg/tl_messages_bot_results_gen.go b/tg/tl_messages_bot_results_gen.go similarity index 100% rename from internal/tg/tl_messages_bot_results_gen.go rename to tg/tl_messages_bot_results_gen.go diff --git a/internal/tg/tl_messages_chat_full_gen.go b/tg/tl_messages_chat_full_gen.go similarity index 100% rename from internal/tg/tl_messages_chat_full_gen.go rename to tg/tl_messages_chat_full_gen.go diff --git a/internal/tg/tl_messages_chats_gen.go b/tg/tl_messages_chats_gen.go similarity index 100% rename from internal/tg/tl_messages_chats_gen.go rename to tg/tl_messages_chats_gen.go diff --git a/internal/tg/tl_messages_check_chat_invite_gen.go b/tg/tl_messages_check_chat_invite_gen.go similarity index 100% rename from internal/tg/tl_messages_check_chat_invite_gen.go rename to tg/tl_messages_check_chat_invite_gen.go diff --git a/internal/tg/tl_messages_clear_all_drafts_gen.go b/tg/tl_messages_clear_all_drafts_gen.go similarity index 100% rename from internal/tg/tl_messages_clear_all_drafts_gen.go rename to tg/tl_messages_clear_all_drafts_gen.go diff --git a/internal/tg/tl_messages_clear_recent_stickers_gen.go b/tg/tl_messages_clear_recent_stickers_gen.go similarity index 100% rename from internal/tg/tl_messages_clear_recent_stickers_gen.go rename to tg/tl_messages_clear_recent_stickers_gen.go diff --git a/internal/tg/tl_messages_create_chat_gen.go b/tg/tl_messages_create_chat_gen.go similarity index 100% rename from internal/tg/tl_messages_create_chat_gen.go rename to tg/tl_messages_create_chat_gen.go diff --git a/internal/tg/tl_messages_delete_chat_user_gen.go b/tg/tl_messages_delete_chat_user_gen.go similarity index 100% rename from internal/tg/tl_messages_delete_chat_user_gen.go rename to tg/tl_messages_delete_chat_user_gen.go diff --git a/internal/tg/tl_messages_delete_history_gen.go b/tg/tl_messages_delete_history_gen.go similarity index 100% rename from internal/tg/tl_messages_delete_history_gen.go rename to tg/tl_messages_delete_history_gen.go diff --git a/internal/tg/tl_messages_delete_messages_gen.go b/tg/tl_messages_delete_messages_gen.go similarity index 100% rename from internal/tg/tl_messages_delete_messages_gen.go rename to tg/tl_messages_delete_messages_gen.go diff --git a/internal/tg/tl_messages_delete_scheduled_messages_gen.go b/tg/tl_messages_delete_scheduled_messages_gen.go similarity index 100% rename from internal/tg/tl_messages_delete_scheduled_messages_gen.go rename to tg/tl_messages_delete_scheduled_messages_gen.go diff --git a/internal/tg/tl_messages_dh_config_gen.go b/tg/tl_messages_dh_config_gen.go similarity index 100% rename from internal/tg/tl_messages_dh_config_gen.go rename to tg/tl_messages_dh_config_gen.go diff --git a/internal/tg/tl_messages_dialogs_gen.go b/tg/tl_messages_dialogs_gen.go similarity index 100% rename from internal/tg/tl_messages_dialogs_gen.go rename to tg/tl_messages_dialogs_gen.go diff --git a/internal/tg/tl_messages_discard_encryption_gen.go b/tg/tl_messages_discard_encryption_gen.go similarity index 100% rename from internal/tg/tl_messages_discard_encryption_gen.go rename to tg/tl_messages_discard_encryption_gen.go diff --git a/internal/tg/tl_messages_discussion_message_gen.go b/tg/tl_messages_discussion_message_gen.go similarity index 100% rename from internal/tg/tl_messages_discussion_message_gen.go rename to tg/tl_messages_discussion_message_gen.go diff --git a/internal/tg/tl_messages_edit_chat_about_gen.go b/tg/tl_messages_edit_chat_about_gen.go similarity index 100% rename from internal/tg/tl_messages_edit_chat_about_gen.go rename to tg/tl_messages_edit_chat_about_gen.go diff --git a/internal/tg/tl_messages_edit_chat_admin_gen.go b/tg/tl_messages_edit_chat_admin_gen.go similarity index 100% rename from internal/tg/tl_messages_edit_chat_admin_gen.go rename to tg/tl_messages_edit_chat_admin_gen.go diff --git a/internal/tg/tl_messages_edit_chat_default_banned_rights_gen.go b/tg/tl_messages_edit_chat_default_banned_rights_gen.go similarity index 100% rename from internal/tg/tl_messages_edit_chat_default_banned_rights_gen.go rename to tg/tl_messages_edit_chat_default_banned_rights_gen.go diff --git a/internal/tg/tl_messages_edit_chat_photo_gen.go b/tg/tl_messages_edit_chat_photo_gen.go similarity index 100% rename from internal/tg/tl_messages_edit_chat_photo_gen.go rename to tg/tl_messages_edit_chat_photo_gen.go diff --git a/internal/tg/tl_messages_edit_chat_title_gen.go b/tg/tl_messages_edit_chat_title_gen.go similarity index 100% rename from internal/tg/tl_messages_edit_chat_title_gen.go rename to tg/tl_messages_edit_chat_title_gen.go diff --git a/internal/tg/tl_messages_edit_inline_bot_message_gen.go b/tg/tl_messages_edit_inline_bot_message_gen.go similarity index 100% rename from internal/tg/tl_messages_edit_inline_bot_message_gen.go rename to tg/tl_messages_edit_inline_bot_message_gen.go diff --git a/internal/tg/tl_messages_edit_message_gen.go b/tg/tl_messages_edit_message_gen.go similarity index 100% rename from internal/tg/tl_messages_edit_message_gen.go rename to tg/tl_messages_edit_message_gen.go diff --git a/internal/tg/tl_messages_export_chat_invite_gen.go b/tg/tl_messages_export_chat_invite_gen.go similarity index 100% rename from internal/tg/tl_messages_export_chat_invite_gen.go rename to tg/tl_messages_export_chat_invite_gen.go diff --git a/internal/tg/tl_messages_fave_sticker_gen.go b/tg/tl_messages_fave_sticker_gen.go similarity index 100% rename from internal/tg/tl_messages_fave_sticker_gen.go rename to tg/tl_messages_fave_sticker_gen.go diff --git a/internal/tg/tl_messages_faved_stickers_gen.go b/tg/tl_messages_faved_stickers_gen.go similarity index 100% rename from internal/tg/tl_messages_faved_stickers_gen.go rename to tg/tl_messages_faved_stickers_gen.go diff --git a/internal/tg/tl_messages_featured_stickers_gen.go b/tg/tl_messages_featured_stickers_gen.go similarity index 100% rename from internal/tg/tl_messages_featured_stickers_gen.go rename to tg/tl_messages_featured_stickers_gen.go diff --git a/internal/tg/tl_messages_filter_gen.go b/tg/tl_messages_filter_gen.go similarity index 100% rename from internal/tg/tl_messages_filter_gen.go rename to tg/tl_messages_filter_gen.go diff --git a/internal/tg/tl_messages_forward_messages_gen.go b/tg/tl_messages_forward_messages_gen.go similarity index 100% rename from internal/tg/tl_messages_forward_messages_gen.go rename to tg/tl_messages_forward_messages_gen.go diff --git a/internal/tg/tl_messages_found_sticker_sets_gen.go b/tg/tl_messages_found_sticker_sets_gen.go similarity index 100% rename from internal/tg/tl_messages_found_sticker_sets_gen.go rename to tg/tl_messages_found_sticker_sets_gen.go diff --git a/internal/tg/tl_messages_get_all_chats_gen.go b/tg/tl_messages_get_all_chats_gen.go similarity index 100% rename from internal/tg/tl_messages_get_all_chats_gen.go rename to tg/tl_messages_get_all_chats_gen.go diff --git a/internal/tg/tl_messages_get_all_drafts_gen.go b/tg/tl_messages_get_all_drafts_gen.go similarity index 100% rename from internal/tg/tl_messages_get_all_drafts_gen.go rename to tg/tl_messages_get_all_drafts_gen.go diff --git a/internal/tg/tl_messages_get_all_stickers_gen.go b/tg/tl_messages_get_all_stickers_gen.go similarity index 100% rename from internal/tg/tl_messages_get_all_stickers_gen.go rename to tg/tl_messages_get_all_stickers_gen.go diff --git a/internal/tg/tl_messages_get_archived_stickers_gen.go b/tg/tl_messages_get_archived_stickers_gen.go similarity index 100% rename from internal/tg/tl_messages_get_archived_stickers_gen.go rename to tg/tl_messages_get_archived_stickers_gen.go diff --git a/internal/tg/tl_messages_get_attached_stickers_gen.go b/tg/tl_messages_get_attached_stickers_gen.go similarity index 100% rename from internal/tg/tl_messages_get_attached_stickers_gen.go rename to tg/tl_messages_get_attached_stickers_gen.go diff --git a/internal/tg/tl_messages_get_bot_callback_answer_gen.go b/tg/tl_messages_get_bot_callback_answer_gen.go similarity index 100% rename from internal/tg/tl_messages_get_bot_callback_answer_gen.go rename to tg/tl_messages_get_bot_callback_answer_gen.go diff --git a/internal/tg/tl_messages_get_chats_gen.go b/tg/tl_messages_get_chats_gen.go similarity index 100% rename from internal/tg/tl_messages_get_chats_gen.go rename to tg/tl_messages_get_chats_gen.go diff --git a/internal/tg/tl_messages_get_common_chats_gen.go b/tg/tl_messages_get_common_chats_gen.go similarity index 100% rename from internal/tg/tl_messages_get_common_chats_gen.go rename to tg/tl_messages_get_common_chats_gen.go diff --git a/internal/tg/tl_messages_get_dh_config_gen.go b/tg/tl_messages_get_dh_config_gen.go similarity index 100% rename from internal/tg/tl_messages_get_dh_config_gen.go rename to tg/tl_messages_get_dh_config_gen.go diff --git a/internal/tg/tl_messages_get_dialog_filters_gen.go b/tg/tl_messages_get_dialog_filters_gen.go similarity index 100% rename from internal/tg/tl_messages_get_dialog_filters_gen.go rename to tg/tl_messages_get_dialog_filters_gen.go diff --git a/internal/tg/tl_messages_get_dialog_unread_marks_gen.go b/tg/tl_messages_get_dialog_unread_marks_gen.go similarity index 100% rename from internal/tg/tl_messages_get_dialog_unread_marks_gen.go rename to tg/tl_messages_get_dialog_unread_marks_gen.go diff --git a/internal/tg/tl_messages_get_dialogs_gen.go b/tg/tl_messages_get_dialogs_gen.go similarity index 100% rename from internal/tg/tl_messages_get_dialogs_gen.go rename to tg/tl_messages_get_dialogs_gen.go diff --git a/internal/tg/tl_messages_get_discussion_message_gen.go b/tg/tl_messages_get_discussion_message_gen.go similarity index 100% rename from internal/tg/tl_messages_get_discussion_message_gen.go rename to tg/tl_messages_get_discussion_message_gen.go diff --git a/internal/tg/tl_messages_get_document_by_hash_gen.go b/tg/tl_messages_get_document_by_hash_gen.go similarity index 100% rename from internal/tg/tl_messages_get_document_by_hash_gen.go rename to tg/tl_messages_get_document_by_hash_gen.go diff --git a/internal/tg/tl_messages_get_emoji_keywords_difference_gen.go b/tg/tl_messages_get_emoji_keywords_difference_gen.go similarity index 100% rename from internal/tg/tl_messages_get_emoji_keywords_difference_gen.go rename to tg/tl_messages_get_emoji_keywords_difference_gen.go diff --git a/internal/tg/tl_messages_get_emoji_keywords_gen.go b/tg/tl_messages_get_emoji_keywords_gen.go similarity index 100% rename from internal/tg/tl_messages_get_emoji_keywords_gen.go rename to tg/tl_messages_get_emoji_keywords_gen.go diff --git a/internal/tg/tl_messages_get_emoji_keywords_languages_gen.go b/tg/tl_messages_get_emoji_keywords_languages_gen.go similarity index 100% rename from internal/tg/tl_messages_get_emoji_keywords_languages_gen.go rename to tg/tl_messages_get_emoji_keywords_languages_gen.go diff --git a/internal/tg/tl_messages_get_emoji_url_gen.go b/tg/tl_messages_get_emoji_url_gen.go similarity index 100% rename from internal/tg/tl_messages_get_emoji_url_gen.go rename to tg/tl_messages_get_emoji_url_gen.go diff --git a/internal/tg/tl_messages_get_faved_stickers_gen.go b/tg/tl_messages_get_faved_stickers_gen.go similarity index 100% rename from internal/tg/tl_messages_get_faved_stickers_gen.go rename to tg/tl_messages_get_faved_stickers_gen.go diff --git a/internal/tg/tl_messages_get_featured_stickers_gen.go b/tg/tl_messages_get_featured_stickers_gen.go similarity index 100% rename from internal/tg/tl_messages_get_featured_stickers_gen.go rename to tg/tl_messages_get_featured_stickers_gen.go diff --git a/internal/tg/tl_messages_get_full_chat_gen.go b/tg/tl_messages_get_full_chat_gen.go similarity index 100% rename from internal/tg/tl_messages_get_full_chat_gen.go rename to tg/tl_messages_get_full_chat_gen.go diff --git a/internal/tg/tl_messages_get_game_high_scores_gen.go b/tg/tl_messages_get_game_high_scores_gen.go similarity index 100% rename from internal/tg/tl_messages_get_game_high_scores_gen.go rename to tg/tl_messages_get_game_high_scores_gen.go diff --git a/internal/tg/tl_messages_get_history_gen.go b/tg/tl_messages_get_history_gen.go similarity index 100% rename from internal/tg/tl_messages_get_history_gen.go rename to tg/tl_messages_get_history_gen.go diff --git a/internal/tg/tl_messages_get_inline_bot_results_gen.go b/tg/tl_messages_get_inline_bot_results_gen.go similarity index 100% rename from internal/tg/tl_messages_get_inline_bot_results_gen.go rename to tg/tl_messages_get_inline_bot_results_gen.go diff --git a/internal/tg/tl_messages_get_inline_game_high_scores_gen.go b/tg/tl_messages_get_inline_game_high_scores_gen.go similarity index 100% rename from internal/tg/tl_messages_get_inline_game_high_scores_gen.go rename to tg/tl_messages_get_inline_game_high_scores_gen.go diff --git a/internal/tg/tl_messages_get_mask_stickers_gen.go b/tg/tl_messages_get_mask_stickers_gen.go similarity index 100% rename from internal/tg/tl_messages_get_mask_stickers_gen.go rename to tg/tl_messages_get_mask_stickers_gen.go diff --git a/internal/tg/tl_messages_get_message_edit_data_gen.go b/tg/tl_messages_get_message_edit_data_gen.go similarity index 100% rename from internal/tg/tl_messages_get_message_edit_data_gen.go rename to tg/tl_messages_get_message_edit_data_gen.go diff --git a/internal/tg/tl_messages_get_messages_gen.go b/tg/tl_messages_get_messages_gen.go similarity index 100% rename from internal/tg/tl_messages_get_messages_gen.go rename to tg/tl_messages_get_messages_gen.go diff --git a/internal/tg/tl_messages_get_messages_views_gen.go b/tg/tl_messages_get_messages_views_gen.go similarity index 100% rename from internal/tg/tl_messages_get_messages_views_gen.go rename to tg/tl_messages_get_messages_views_gen.go diff --git a/internal/tg/tl_messages_get_old_featured_stickers_gen.go b/tg/tl_messages_get_old_featured_stickers_gen.go similarity index 100% rename from internal/tg/tl_messages_get_old_featured_stickers_gen.go rename to tg/tl_messages_get_old_featured_stickers_gen.go diff --git a/internal/tg/tl_messages_get_onlines_gen.go b/tg/tl_messages_get_onlines_gen.go similarity index 100% rename from internal/tg/tl_messages_get_onlines_gen.go rename to tg/tl_messages_get_onlines_gen.go diff --git a/internal/tg/tl_messages_get_peer_dialogs_gen.go b/tg/tl_messages_get_peer_dialogs_gen.go similarity index 100% rename from internal/tg/tl_messages_get_peer_dialogs_gen.go rename to tg/tl_messages_get_peer_dialogs_gen.go diff --git a/internal/tg/tl_messages_get_peer_settings_gen.go b/tg/tl_messages_get_peer_settings_gen.go similarity index 100% rename from internal/tg/tl_messages_get_peer_settings_gen.go rename to tg/tl_messages_get_peer_settings_gen.go diff --git a/internal/tg/tl_messages_get_pinned_dialogs_gen.go b/tg/tl_messages_get_pinned_dialogs_gen.go similarity index 100% rename from internal/tg/tl_messages_get_pinned_dialogs_gen.go rename to tg/tl_messages_get_pinned_dialogs_gen.go diff --git a/internal/tg/tl_messages_get_poll_results_gen.go b/tg/tl_messages_get_poll_results_gen.go similarity index 100% rename from internal/tg/tl_messages_get_poll_results_gen.go rename to tg/tl_messages_get_poll_results_gen.go diff --git a/internal/tg/tl_messages_get_poll_votes_gen.go b/tg/tl_messages_get_poll_votes_gen.go similarity index 100% rename from internal/tg/tl_messages_get_poll_votes_gen.go rename to tg/tl_messages_get_poll_votes_gen.go diff --git a/internal/tg/tl_messages_get_recent_locations_gen.go b/tg/tl_messages_get_recent_locations_gen.go similarity index 100% rename from internal/tg/tl_messages_get_recent_locations_gen.go rename to tg/tl_messages_get_recent_locations_gen.go diff --git a/internal/tg/tl_messages_get_recent_stickers_gen.go b/tg/tl_messages_get_recent_stickers_gen.go similarity index 100% rename from internal/tg/tl_messages_get_recent_stickers_gen.go rename to tg/tl_messages_get_recent_stickers_gen.go diff --git a/internal/tg/tl_messages_get_replies_gen.go b/tg/tl_messages_get_replies_gen.go similarity index 100% rename from internal/tg/tl_messages_get_replies_gen.go rename to tg/tl_messages_get_replies_gen.go diff --git a/internal/tg/tl_messages_get_saved_gifs_gen.go b/tg/tl_messages_get_saved_gifs_gen.go similarity index 100% rename from internal/tg/tl_messages_get_saved_gifs_gen.go rename to tg/tl_messages_get_saved_gifs_gen.go diff --git a/internal/tg/tl_messages_get_scheduled_history_gen.go b/tg/tl_messages_get_scheduled_history_gen.go similarity index 100% rename from internal/tg/tl_messages_get_scheduled_history_gen.go rename to tg/tl_messages_get_scheduled_history_gen.go diff --git a/internal/tg/tl_messages_get_scheduled_messages_gen.go b/tg/tl_messages_get_scheduled_messages_gen.go similarity index 100% rename from internal/tg/tl_messages_get_scheduled_messages_gen.go rename to tg/tl_messages_get_scheduled_messages_gen.go diff --git a/internal/tg/tl_messages_get_search_counters_gen.go b/tg/tl_messages_get_search_counters_gen.go similarity index 100% rename from internal/tg/tl_messages_get_search_counters_gen.go rename to tg/tl_messages_get_search_counters_gen.go diff --git a/internal/tg/tl_messages_get_split_ranges_gen.go b/tg/tl_messages_get_split_ranges_gen.go similarity index 100% rename from internal/tg/tl_messages_get_split_ranges_gen.go rename to tg/tl_messages_get_split_ranges_gen.go diff --git a/internal/tg/tl_messages_get_stats_url_gen.go b/tg/tl_messages_get_stats_url_gen.go similarity index 100% rename from internal/tg/tl_messages_get_stats_url_gen.go rename to tg/tl_messages_get_stats_url_gen.go diff --git a/internal/tg/tl_messages_get_sticker_set_gen.go b/tg/tl_messages_get_sticker_set_gen.go similarity index 100% rename from internal/tg/tl_messages_get_sticker_set_gen.go rename to tg/tl_messages_get_sticker_set_gen.go diff --git a/internal/tg/tl_messages_get_stickers_gen.go b/tg/tl_messages_get_stickers_gen.go similarity index 100% rename from internal/tg/tl_messages_get_stickers_gen.go rename to tg/tl_messages_get_stickers_gen.go diff --git a/internal/tg/tl_messages_get_suggested_dialog_filters_gen.go b/tg/tl_messages_get_suggested_dialog_filters_gen.go similarity index 100% rename from internal/tg/tl_messages_get_suggested_dialog_filters_gen.go rename to tg/tl_messages_get_suggested_dialog_filters_gen.go diff --git a/internal/tg/tl_messages_get_unread_mentions_gen.go b/tg/tl_messages_get_unread_mentions_gen.go similarity index 100% rename from internal/tg/tl_messages_get_unread_mentions_gen.go rename to tg/tl_messages_get_unread_mentions_gen.go diff --git a/internal/tg/tl_messages_get_web_page_gen.go b/tg/tl_messages_get_web_page_gen.go similarity index 100% rename from internal/tg/tl_messages_get_web_page_gen.go rename to tg/tl_messages_get_web_page_gen.go diff --git a/internal/tg/tl_messages_get_web_page_preview_gen.go b/tg/tl_messages_get_web_page_preview_gen.go similarity index 100% rename from internal/tg/tl_messages_get_web_page_preview_gen.go rename to tg/tl_messages_get_web_page_preview_gen.go diff --git a/internal/tg/tl_messages_hide_peer_settings_bar_gen.go b/tg/tl_messages_hide_peer_settings_bar_gen.go similarity index 100% rename from internal/tg/tl_messages_hide_peer_settings_bar_gen.go rename to tg/tl_messages_hide_peer_settings_bar_gen.go diff --git a/internal/tg/tl_messages_high_scores_gen.go b/tg/tl_messages_high_scores_gen.go similarity index 100% rename from internal/tg/tl_messages_high_scores_gen.go rename to tg/tl_messages_high_scores_gen.go diff --git a/internal/tg/tl_messages_import_chat_invite_gen.go b/tg/tl_messages_import_chat_invite_gen.go similarity index 100% rename from internal/tg/tl_messages_import_chat_invite_gen.go rename to tg/tl_messages_import_chat_invite_gen.go diff --git a/internal/tg/tl_messages_inactive_chats_gen.go b/tg/tl_messages_inactive_chats_gen.go similarity index 100% rename from internal/tg/tl_messages_inactive_chats_gen.go rename to tg/tl_messages_inactive_chats_gen.go diff --git a/internal/tg/tl_messages_install_sticker_set_gen.go b/tg/tl_messages_install_sticker_set_gen.go similarity index 100% rename from internal/tg/tl_messages_install_sticker_set_gen.go rename to tg/tl_messages_install_sticker_set_gen.go diff --git a/internal/tg/tl_messages_mark_dialog_unread_gen.go b/tg/tl_messages_mark_dialog_unread_gen.go similarity index 100% rename from internal/tg/tl_messages_mark_dialog_unread_gen.go rename to tg/tl_messages_mark_dialog_unread_gen.go diff --git a/internal/tg/tl_messages_message_edit_data_gen.go b/tg/tl_messages_message_edit_data_gen.go similarity index 100% rename from internal/tg/tl_messages_message_edit_data_gen.go rename to tg/tl_messages_message_edit_data_gen.go diff --git a/internal/tg/tl_messages_message_views_gen.go b/tg/tl_messages_message_views_gen.go similarity index 100% rename from internal/tg/tl_messages_message_views_gen.go rename to tg/tl_messages_message_views_gen.go diff --git a/internal/tg/tl_messages_messages_gen.go b/tg/tl_messages_messages_gen.go similarity index 100% rename from internal/tg/tl_messages_messages_gen.go rename to tg/tl_messages_messages_gen.go diff --git a/internal/tg/tl_messages_migrate_chat_gen.go b/tg/tl_messages_migrate_chat_gen.go similarity index 100% rename from internal/tg/tl_messages_migrate_chat_gen.go rename to tg/tl_messages_migrate_chat_gen.go diff --git a/internal/tg/tl_messages_peer_dialogs_gen.go b/tg/tl_messages_peer_dialogs_gen.go similarity index 100% rename from internal/tg/tl_messages_peer_dialogs_gen.go rename to tg/tl_messages_peer_dialogs_gen.go diff --git a/internal/tg/tl_messages_read_discussion_gen.go b/tg/tl_messages_read_discussion_gen.go similarity index 100% rename from internal/tg/tl_messages_read_discussion_gen.go rename to tg/tl_messages_read_discussion_gen.go diff --git a/internal/tg/tl_messages_read_encrypted_history_gen.go b/tg/tl_messages_read_encrypted_history_gen.go similarity index 100% rename from internal/tg/tl_messages_read_encrypted_history_gen.go rename to tg/tl_messages_read_encrypted_history_gen.go diff --git a/internal/tg/tl_messages_read_featured_stickers_gen.go b/tg/tl_messages_read_featured_stickers_gen.go similarity index 100% rename from internal/tg/tl_messages_read_featured_stickers_gen.go rename to tg/tl_messages_read_featured_stickers_gen.go diff --git a/internal/tg/tl_messages_read_history_gen.go b/tg/tl_messages_read_history_gen.go similarity index 100% rename from internal/tg/tl_messages_read_history_gen.go rename to tg/tl_messages_read_history_gen.go diff --git a/internal/tg/tl_messages_read_mentions_gen.go b/tg/tl_messages_read_mentions_gen.go similarity index 100% rename from internal/tg/tl_messages_read_mentions_gen.go rename to tg/tl_messages_read_mentions_gen.go diff --git a/internal/tg/tl_messages_read_message_contents_gen.go b/tg/tl_messages_read_message_contents_gen.go similarity index 100% rename from internal/tg/tl_messages_read_message_contents_gen.go rename to tg/tl_messages_read_message_contents_gen.go diff --git a/internal/tg/tl_messages_received_messages_gen.go b/tg/tl_messages_received_messages_gen.go similarity index 100% rename from internal/tg/tl_messages_received_messages_gen.go rename to tg/tl_messages_received_messages_gen.go diff --git a/internal/tg/tl_messages_received_queue_gen.go b/tg/tl_messages_received_queue_gen.go similarity index 100% rename from internal/tg/tl_messages_received_queue_gen.go rename to tg/tl_messages_received_queue_gen.go diff --git a/internal/tg/tl_messages_recent_stickers_gen.go b/tg/tl_messages_recent_stickers_gen.go similarity index 100% rename from internal/tg/tl_messages_recent_stickers_gen.go rename to tg/tl_messages_recent_stickers_gen.go diff --git a/internal/tg/tl_messages_reorder_pinned_dialogs_gen.go b/tg/tl_messages_reorder_pinned_dialogs_gen.go similarity index 100% rename from internal/tg/tl_messages_reorder_pinned_dialogs_gen.go rename to tg/tl_messages_reorder_pinned_dialogs_gen.go diff --git a/internal/tg/tl_messages_reorder_sticker_sets_gen.go b/tg/tl_messages_reorder_sticker_sets_gen.go similarity index 100% rename from internal/tg/tl_messages_reorder_sticker_sets_gen.go rename to tg/tl_messages_reorder_sticker_sets_gen.go diff --git a/internal/tg/tl_messages_report_encrypted_spam_gen.go b/tg/tl_messages_report_encrypted_spam_gen.go similarity index 100% rename from internal/tg/tl_messages_report_encrypted_spam_gen.go rename to tg/tl_messages_report_encrypted_spam_gen.go diff --git a/internal/tg/tl_messages_report_gen.go b/tg/tl_messages_report_gen.go similarity index 100% rename from internal/tg/tl_messages_report_gen.go rename to tg/tl_messages_report_gen.go diff --git a/internal/tg/tl_messages_report_spam_gen.go b/tg/tl_messages_report_spam_gen.go similarity index 100% rename from internal/tg/tl_messages_report_spam_gen.go rename to tg/tl_messages_report_spam_gen.go diff --git a/internal/tg/tl_messages_request_encryption_gen.go b/tg/tl_messages_request_encryption_gen.go similarity index 100% rename from internal/tg/tl_messages_request_encryption_gen.go rename to tg/tl_messages_request_encryption_gen.go diff --git a/internal/tg/tl_messages_request_url_auth_gen.go b/tg/tl_messages_request_url_auth_gen.go similarity index 100% rename from internal/tg/tl_messages_request_url_auth_gen.go rename to tg/tl_messages_request_url_auth_gen.go diff --git a/internal/tg/tl_messages_save_draft_gen.go b/tg/tl_messages_save_draft_gen.go similarity index 100% rename from internal/tg/tl_messages_save_draft_gen.go rename to tg/tl_messages_save_draft_gen.go diff --git a/internal/tg/tl_messages_save_gif_gen.go b/tg/tl_messages_save_gif_gen.go similarity index 100% rename from internal/tg/tl_messages_save_gif_gen.go rename to tg/tl_messages_save_gif_gen.go diff --git a/internal/tg/tl_messages_save_recent_sticker_gen.go b/tg/tl_messages_save_recent_sticker_gen.go similarity index 100% rename from internal/tg/tl_messages_save_recent_sticker_gen.go rename to tg/tl_messages_save_recent_sticker_gen.go diff --git a/internal/tg/tl_messages_saved_gifs_gen.go b/tg/tl_messages_saved_gifs_gen.go similarity index 100% rename from internal/tg/tl_messages_saved_gifs_gen.go rename to tg/tl_messages_saved_gifs_gen.go diff --git a/internal/tg/tl_messages_search_counter_gen.go b/tg/tl_messages_search_counter_gen.go similarity index 100% rename from internal/tg/tl_messages_search_counter_gen.go rename to tg/tl_messages_search_counter_gen.go diff --git a/internal/tg/tl_messages_search_gen.go b/tg/tl_messages_search_gen.go similarity index 100% rename from internal/tg/tl_messages_search_gen.go rename to tg/tl_messages_search_gen.go diff --git a/internal/tg/tl_messages_search_global_gen.go b/tg/tl_messages_search_global_gen.go similarity index 100% rename from internal/tg/tl_messages_search_global_gen.go rename to tg/tl_messages_search_global_gen.go diff --git a/internal/tg/tl_messages_search_sticker_sets_gen.go b/tg/tl_messages_search_sticker_sets_gen.go similarity index 100% rename from internal/tg/tl_messages_search_sticker_sets_gen.go rename to tg/tl_messages_search_sticker_sets_gen.go diff --git a/internal/tg/tl_messages_send_encrypted_file_gen.go b/tg/tl_messages_send_encrypted_file_gen.go similarity index 100% rename from internal/tg/tl_messages_send_encrypted_file_gen.go rename to tg/tl_messages_send_encrypted_file_gen.go diff --git a/internal/tg/tl_messages_send_encrypted_gen.go b/tg/tl_messages_send_encrypted_gen.go similarity index 100% rename from internal/tg/tl_messages_send_encrypted_gen.go rename to tg/tl_messages_send_encrypted_gen.go diff --git a/internal/tg/tl_messages_send_encrypted_service_gen.go b/tg/tl_messages_send_encrypted_service_gen.go similarity index 100% rename from internal/tg/tl_messages_send_encrypted_service_gen.go rename to tg/tl_messages_send_encrypted_service_gen.go diff --git a/internal/tg/tl_messages_send_inline_bot_result_gen.go b/tg/tl_messages_send_inline_bot_result_gen.go similarity index 100% rename from internal/tg/tl_messages_send_inline_bot_result_gen.go rename to tg/tl_messages_send_inline_bot_result_gen.go diff --git a/internal/tg/tl_messages_send_media_gen.go b/tg/tl_messages_send_media_gen.go similarity index 100% rename from internal/tg/tl_messages_send_media_gen.go rename to tg/tl_messages_send_media_gen.go diff --git a/internal/tg/tl_messages_send_message_gen.go b/tg/tl_messages_send_message_gen.go similarity index 100% rename from internal/tg/tl_messages_send_message_gen.go rename to tg/tl_messages_send_message_gen.go diff --git a/internal/tg/tl_messages_send_multi_media_gen.go b/tg/tl_messages_send_multi_media_gen.go similarity index 100% rename from internal/tg/tl_messages_send_multi_media_gen.go rename to tg/tl_messages_send_multi_media_gen.go diff --git a/internal/tg/tl_messages_send_scheduled_messages_gen.go b/tg/tl_messages_send_scheduled_messages_gen.go similarity index 100% rename from internal/tg/tl_messages_send_scheduled_messages_gen.go rename to tg/tl_messages_send_scheduled_messages_gen.go diff --git a/internal/tg/tl_messages_send_screenshot_notification_gen.go b/tg/tl_messages_send_screenshot_notification_gen.go similarity index 100% rename from internal/tg/tl_messages_send_screenshot_notification_gen.go rename to tg/tl_messages_send_screenshot_notification_gen.go diff --git a/internal/tg/tl_messages_send_vote_gen.go b/tg/tl_messages_send_vote_gen.go similarity index 100% rename from internal/tg/tl_messages_send_vote_gen.go rename to tg/tl_messages_send_vote_gen.go diff --git a/internal/tg/tl_messages_sent_encrypted_message_gen.go b/tg/tl_messages_sent_encrypted_message_gen.go similarity index 100% rename from internal/tg/tl_messages_sent_encrypted_message_gen.go rename to tg/tl_messages_sent_encrypted_message_gen.go diff --git a/internal/tg/tl_messages_set_bot_callback_answer_gen.go b/tg/tl_messages_set_bot_callback_answer_gen.go similarity index 100% rename from internal/tg/tl_messages_set_bot_callback_answer_gen.go rename to tg/tl_messages_set_bot_callback_answer_gen.go diff --git a/internal/tg/tl_messages_set_bot_precheckout_results_gen.go b/tg/tl_messages_set_bot_precheckout_results_gen.go similarity index 100% rename from internal/tg/tl_messages_set_bot_precheckout_results_gen.go rename to tg/tl_messages_set_bot_precheckout_results_gen.go diff --git a/internal/tg/tl_messages_set_bot_shipping_results_gen.go b/tg/tl_messages_set_bot_shipping_results_gen.go similarity index 100% rename from internal/tg/tl_messages_set_bot_shipping_results_gen.go rename to tg/tl_messages_set_bot_shipping_results_gen.go diff --git a/internal/tg/tl_messages_set_encrypted_typing_gen.go b/tg/tl_messages_set_encrypted_typing_gen.go similarity index 100% rename from internal/tg/tl_messages_set_encrypted_typing_gen.go rename to tg/tl_messages_set_encrypted_typing_gen.go diff --git a/internal/tg/tl_messages_set_game_score_gen.go b/tg/tl_messages_set_game_score_gen.go similarity index 100% rename from internal/tg/tl_messages_set_game_score_gen.go rename to tg/tl_messages_set_game_score_gen.go diff --git a/internal/tg/tl_messages_set_inline_bot_results_gen.go b/tg/tl_messages_set_inline_bot_results_gen.go similarity index 100% rename from internal/tg/tl_messages_set_inline_bot_results_gen.go rename to tg/tl_messages_set_inline_bot_results_gen.go diff --git a/internal/tg/tl_messages_set_inline_game_score_gen.go b/tg/tl_messages_set_inline_game_score_gen.go similarity index 100% rename from internal/tg/tl_messages_set_inline_game_score_gen.go rename to tg/tl_messages_set_inline_game_score_gen.go diff --git a/internal/tg/tl_messages_set_typing_gen.go b/tg/tl_messages_set_typing_gen.go similarity index 100% rename from internal/tg/tl_messages_set_typing_gen.go rename to tg/tl_messages_set_typing_gen.go diff --git a/internal/tg/tl_messages_start_bot_gen.go b/tg/tl_messages_start_bot_gen.go similarity index 100% rename from internal/tg/tl_messages_start_bot_gen.go rename to tg/tl_messages_start_bot_gen.go diff --git a/internal/tg/tl_messages_sticker_set_gen.go b/tg/tl_messages_sticker_set_gen.go similarity index 100% rename from internal/tg/tl_messages_sticker_set_gen.go rename to tg/tl_messages_sticker_set_gen.go diff --git a/internal/tg/tl_messages_sticker_set_install_result_gen.go b/tg/tl_messages_sticker_set_install_result_gen.go similarity index 100% rename from internal/tg/tl_messages_sticker_set_install_result_gen.go rename to tg/tl_messages_sticker_set_install_result_gen.go diff --git a/internal/tg/tl_messages_stickers_gen.go b/tg/tl_messages_stickers_gen.go similarity index 100% rename from internal/tg/tl_messages_stickers_gen.go rename to tg/tl_messages_stickers_gen.go diff --git a/internal/tg/tl_messages_toggle_dialog_pin_gen.go b/tg/tl_messages_toggle_dialog_pin_gen.go similarity index 100% rename from internal/tg/tl_messages_toggle_dialog_pin_gen.go rename to tg/tl_messages_toggle_dialog_pin_gen.go diff --git a/internal/tg/tl_messages_toggle_sticker_sets_gen.go b/tg/tl_messages_toggle_sticker_sets_gen.go similarity index 100% rename from internal/tg/tl_messages_toggle_sticker_sets_gen.go rename to tg/tl_messages_toggle_sticker_sets_gen.go diff --git a/internal/tg/tl_messages_uninstall_sticker_set_gen.go b/tg/tl_messages_uninstall_sticker_set_gen.go similarity index 100% rename from internal/tg/tl_messages_uninstall_sticker_set_gen.go rename to tg/tl_messages_uninstall_sticker_set_gen.go diff --git a/internal/tg/tl_messages_unpin_all_messages_gen.go b/tg/tl_messages_unpin_all_messages_gen.go similarity index 100% rename from internal/tg/tl_messages_unpin_all_messages_gen.go rename to tg/tl_messages_unpin_all_messages_gen.go diff --git a/internal/tg/tl_messages_update_dialog_filter_gen.go b/tg/tl_messages_update_dialog_filter_gen.go similarity index 100% rename from internal/tg/tl_messages_update_dialog_filter_gen.go rename to tg/tl_messages_update_dialog_filter_gen.go diff --git a/internal/tg/tl_messages_update_dialog_filters_order_gen.go b/tg/tl_messages_update_dialog_filters_order_gen.go similarity index 100% rename from internal/tg/tl_messages_update_dialog_filters_order_gen.go rename to tg/tl_messages_update_dialog_filters_order_gen.go diff --git a/internal/tg/tl_messages_update_pinned_message_gen.go b/tg/tl_messages_update_pinned_message_gen.go similarity index 100% rename from internal/tg/tl_messages_update_pinned_message_gen.go rename to tg/tl_messages_update_pinned_message_gen.go diff --git a/internal/tg/tl_messages_upload_encrypted_file_gen.go b/tg/tl_messages_upload_encrypted_file_gen.go similarity index 100% rename from internal/tg/tl_messages_upload_encrypted_file_gen.go rename to tg/tl_messages_upload_encrypted_file_gen.go diff --git a/internal/tg/tl_messages_upload_media_gen.go b/tg/tl_messages_upload_media_gen.go similarity index 100% rename from internal/tg/tl_messages_upload_media_gen.go rename to tg/tl_messages_upload_media_gen.go diff --git a/internal/tg/tl_messages_votes_list_gen.go b/tg/tl_messages_votes_list_gen.go similarity index 100% rename from internal/tg/tl_messages_votes_list_gen.go rename to tg/tl_messages_votes_list_gen.go diff --git a/internal/tg/tl_nearest_dc_gen.go b/tg/tl_nearest_dc_gen.go similarity index 100% rename from internal/tg/tl_nearest_dc_gen.go rename to tg/tl_nearest_dc_gen.go diff --git a/internal/tg/tl_notify_peer_gen.go b/tg/tl_notify_peer_gen.go similarity index 100% rename from internal/tg/tl_notify_peer_gen.go rename to tg/tl_notify_peer_gen.go diff --git a/internal/tg/tl_null_gen.go b/tg/tl_null_gen.go similarity index 100% rename from internal/tg/tl_null_gen.go rename to tg/tl_null_gen.go diff --git a/internal/tg/tl_page_block_gen.go b/tg/tl_page_block_gen.go similarity index 100% rename from internal/tg/tl_page_block_gen.go rename to tg/tl_page_block_gen.go diff --git a/internal/tg/tl_page_caption_gen.go b/tg/tl_page_caption_gen.go similarity index 100% rename from internal/tg/tl_page_caption_gen.go rename to tg/tl_page_caption_gen.go diff --git a/internal/tg/tl_page_gen.go b/tg/tl_page_gen.go similarity index 100% rename from internal/tg/tl_page_gen.go rename to tg/tl_page_gen.go diff --git a/internal/tg/tl_page_list_item_gen.go b/tg/tl_page_list_item_gen.go similarity index 100% rename from internal/tg/tl_page_list_item_gen.go rename to tg/tl_page_list_item_gen.go diff --git a/internal/tg/tl_page_list_ordered_item_gen.go b/tg/tl_page_list_ordered_item_gen.go similarity index 100% rename from internal/tg/tl_page_list_ordered_item_gen.go rename to tg/tl_page_list_ordered_item_gen.go diff --git a/internal/tg/tl_page_related_article_gen.go b/tg/tl_page_related_article_gen.go similarity index 100% rename from internal/tg/tl_page_related_article_gen.go rename to tg/tl_page_related_article_gen.go diff --git a/internal/tg/tl_page_table_cell_gen.go b/tg/tl_page_table_cell_gen.go similarity index 100% rename from internal/tg/tl_page_table_cell_gen.go rename to tg/tl_page_table_cell_gen.go diff --git a/internal/tg/tl_page_table_row_gen.go b/tg/tl_page_table_row_gen.go similarity index 100% rename from internal/tg/tl_page_table_row_gen.go rename to tg/tl_page_table_row_gen.go diff --git a/internal/tg/tl_password_kdf_algo_gen.go b/tg/tl_password_kdf_algo_gen.go similarity index 100% rename from internal/tg/tl_password_kdf_algo_gen.go rename to tg/tl_password_kdf_algo_gen.go diff --git a/internal/tg/tl_payment_charge_gen.go b/tg/tl_payment_charge_gen.go similarity index 100% rename from internal/tg/tl_payment_charge_gen.go rename to tg/tl_payment_charge_gen.go diff --git a/internal/tg/tl_payment_requested_info_gen.go b/tg/tl_payment_requested_info_gen.go similarity index 100% rename from internal/tg/tl_payment_requested_info_gen.go rename to tg/tl_payment_requested_info_gen.go diff --git a/internal/tg/tl_payment_saved_credentials_card_gen.go b/tg/tl_payment_saved_credentials_card_gen.go similarity index 100% rename from internal/tg/tl_payment_saved_credentials_card_gen.go rename to tg/tl_payment_saved_credentials_card_gen.go diff --git a/internal/tg/tl_payments_bank_card_data_gen.go b/tg/tl_payments_bank_card_data_gen.go similarity index 100% rename from internal/tg/tl_payments_bank_card_data_gen.go rename to tg/tl_payments_bank_card_data_gen.go diff --git a/internal/tg/tl_payments_clear_saved_info_gen.go b/tg/tl_payments_clear_saved_info_gen.go similarity index 100% rename from internal/tg/tl_payments_clear_saved_info_gen.go rename to tg/tl_payments_clear_saved_info_gen.go diff --git a/internal/tg/tl_payments_get_bank_card_data_gen.go b/tg/tl_payments_get_bank_card_data_gen.go similarity index 100% rename from internal/tg/tl_payments_get_bank_card_data_gen.go rename to tg/tl_payments_get_bank_card_data_gen.go diff --git a/internal/tg/tl_payments_get_payment_form_gen.go b/tg/tl_payments_get_payment_form_gen.go similarity index 100% rename from internal/tg/tl_payments_get_payment_form_gen.go rename to tg/tl_payments_get_payment_form_gen.go diff --git a/internal/tg/tl_payments_get_payment_receipt_gen.go b/tg/tl_payments_get_payment_receipt_gen.go similarity index 100% rename from internal/tg/tl_payments_get_payment_receipt_gen.go rename to tg/tl_payments_get_payment_receipt_gen.go diff --git a/internal/tg/tl_payments_get_saved_info_gen.go b/tg/tl_payments_get_saved_info_gen.go similarity index 100% rename from internal/tg/tl_payments_get_saved_info_gen.go rename to tg/tl_payments_get_saved_info_gen.go diff --git a/internal/tg/tl_payments_payment_form_gen.go b/tg/tl_payments_payment_form_gen.go similarity index 100% rename from internal/tg/tl_payments_payment_form_gen.go rename to tg/tl_payments_payment_form_gen.go diff --git a/internal/tg/tl_payments_payment_receipt_gen.go b/tg/tl_payments_payment_receipt_gen.go similarity index 100% rename from internal/tg/tl_payments_payment_receipt_gen.go rename to tg/tl_payments_payment_receipt_gen.go diff --git a/internal/tg/tl_payments_payment_result_gen.go b/tg/tl_payments_payment_result_gen.go similarity index 100% rename from internal/tg/tl_payments_payment_result_gen.go rename to tg/tl_payments_payment_result_gen.go diff --git a/internal/tg/tl_payments_saved_info_gen.go b/tg/tl_payments_saved_info_gen.go similarity index 100% rename from internal/tg/tl_payments_saved_info_gen.go rename to tg/tl_payments_saved_info_gen.go diff --git a/internal/tg/tl_payments_send_payment_form_gen.go b/tg/tl_payments_send_payment_form_gen.go similarity index 100% rename from internal/tg/tl_payments_send_payment_form_gen.go rename to tg/tl_payments_send_payment_form_gen.go diff --git a/internal/tg/tl_payments_validate_requested_info_gen.go b/tg/tl_payments_validate_requested_info_gen.go similarity index 100% rename from internal/tg/tl_payments_validate_requested_info_gen.go rename to tg/tl_payments_validate_requested_info_gen.go diff --git a/internal/tg/tl_payments_validated_requested_info_gen.go b/tg/tl_payments_validated_requested_info_gen.go similarity index 100% rename from internal/tg/tl_payments_validated_requested_info_gen.go rename to tg/tl_payments_validated_requested_info_gen.go diff --git a/internal/tg/tl_peer_blocked_gen.go b/tg/tl_peer_blocked_gen.go similarity index 100% rename from internal/tg/tl_peer_blocked_gen.go rename to tg/tl_peer_blocked_gen.go diff --git a/internal/tg/tl_peer_gen.go b/tg/tl_peer_gen.go similarity index 100% rename from internal/tg/tl_peer_gen.go rename to tg/tl_peer_gen.go diff --git a/internal/tg/tl_peer_located_gen.go b/tg/tl_peer_located_gen.go similarity index 100% rename from internal/tg/tl_peer_located_gen.go rename to tg/tl_peer_located_gen.go diff --git a/internal/tg/tl_peer_notify_settings_gen.go b/tg/tl_peer_notify_settings_gen.go similarity index 100% rename from internal/tg/tl_peer_notify_settings_gen.go rename to tg/tl_peer_notify_settings_gen.go diff --git a/internal/tg/tl_peer_settings_gen.go b/tg/tl_peer_settings_gen.go similarity index 100% rename from internal/tg/tl_peer_settings_gen.go rename to tg/tl_peer_settings_gen.go diff --git a/internal/tg/tl_phone_accept_call_gen.go b/tg/tl_phone_accept_call_gen.go similarity index 100% rename from internal/tg/tl_phone_accept_call_gen.go rename to tg/tl_phone_accept_call_gen.go diff --git a/internal/tg/tl_phone_call_discard_reason_gen.go b/tg/tl_phone_call_discard_reason_gen.go similarity index 100% rename from internal/tg/tl_phone_call_discard_reason_gen.go rename to tg/tl_phone_call_discard_reason_gen.go diff --git a/internal/tg/tl_phone_call_gen.go b/tg/tl_phone_call_gen.go similarity index 100% rename from internal/tg/tl_phone_call_gen.go rename to tg/tl_phone_call_gen.go diff --git a/internal/tg/tl_phone_call_protocol_gen.go b/tg/tl_phone_call_protocol_gen.go similarity index 100% rename from internal/tg/tl_phone_call_protocol_gen.go rename to tg/tl_phone_call_protocol_gen.go diff --git a/internal/tg/tl_phone_confirm_call_gen.go b/tg/tl_phone_confirm_call_gen.go similarity index 100% rename from internal/tg/tl_phone_confirm_call_gen.go rename to tg/tl_phone_confirm_call_gen.go diff --git a/internal/tg/tl_phone_connection_gen.go b/tg/tl_phone_connection_gen.go similarity index 100% rename from internal/tg/tl_phone_connection_gen.go rename to tg/tl_phone_connection_gen.go diff --git a/internal/tg/tl_phone_discard_call_gen.go b/tg/tl_phone_discard_call_gen.go similarity index 100% rename from internal/tg/tl_phone_discard_call_gen.go rename to tg/tl_phone_discard_call_gen.go diff --git a/internal/tg/tl_phone_get_call_config_gen.go b/tg/tl_phone_get_call_config_gen.go similarity index 100% rename from internal/tg/tl_phone_get_call_config_gen.go rename to tg/tl_phone_get_call_config_gen.go diff --git a/internal/tg/tl_phone_phone_call_gen.go b/tg/tl_phone_phone_call_gen.go similarity index 100% rename from internal/tg/tl_phone_phone_call_gen.go rename to tg/tl_phone_phone_call_gen.go diff --git a/internal/tg/tl_phone_received_call_gen.go b/tg/tl_phone_received_call_gen.go similarity index 100% rename from internal/tg/tl_phone_received_call_gen.go rename to tg/tl_phone_received_call_gen.go diff --git a/internal/tg/tl_phone_request_call_gen.go b/tg/tl_phone_request_call_gen.go similarity index 100% rename from internal/tg/tl_phone_request_call_gen.go rename to tg/tl_phone_request_call_gen.go diff --git a/internal/tg/tl_phone_save_call_debug_gen.go b/tg/tl_phone_save_call_debug_gen.go similarity index 100% rename from internal/tg/tl_phone_save_call_debug_gen.go rename to tg/tl_phone_save_call_debug_gen.go diff --git a/internal/tg/tl_phone_send_signaling_data_gen.go b/tg/tl_phone_send_signaling_data_gen.go similarity index 100% rename from internal/tg/tl_phone_send_signaling_data_gen.go rename to tg/tl_phone_send_signaling_data_gen.go diff --git a/internal/tg/tl_phone_set_call_rating_gen.go b/tg/tl_phone_set_call_rating_gen.go similarity index 100% rename from internal/tg/tl_phone_set_call_rating_gen.go rename to tg/tl_phone_set_call_rating_gen.go diff --git a/internal/tg/tl_photo_gen.go b/tg/tl_photo_gen.go similarity index 100% rename from internal/tg/tl_photo_gen.go rename to tg/tl_photo_gen.go diff --git a/internal/tg/tl_photo_size_gen.go b/tg/tl_photo_size_gen.go similarity index 100% rename from internal/tg/tl_photo_size_gen.go rename to tg/tl_photo_size_gen.go diff --git a/internal/tg/tl_photos_delete_photos_gen.go b/tg/tl_photos_delete_photos_gen.go similarity index 100% rename from internal/tg/tl_photos_delete_photos_gen.go rename to tg/tl_photos_delete_photos_gen.go diff --git a/internal/tg/tl_photos_get_user_photos_gen.go b/tg/tl_photos_get_user_photos_gen.go similarity index 100% rename from internal/tg/tl_photos_get_user_photos_gen.go rename to tg/tl_photos_get_user_photos_gen.go diff --git a/internal/tg/tl_photos_photo_gen.go b/tg/tl_photos_photo_gen.go similarity index 100% rename from internal/tg/tl_photos_photo_gen.go rename to tg/tl_photos_photo_gen.go diff --git a/internal/tg/tl_photos_photos_gen.go b/tg/tl_photos_photos_gen.go similarity index 100% rename from internal/tg/tl_photos_photos_gen.go rename to tg/tl_photos_photos_gen.go diff --git a/internal/tg/tl_photos_update_profile_photo_gen.go b/tg/tl_photos_update_profile_photo_gen.go similarity index 100% rename from internal/tg/tl_photos_update_profile_photo_gen.go rename to tg/tl_photos_update_profile_photo_gen.go diff --git a/internal/tg/tl_photos_upload_profile_photo_gen.go b/tg/tl_photos_upload_profile_photo_gen.go similarity index 100% rename from internal/tg/tl_photos_upload_profile_photo_gen.go rename to tg/tl_photos_upload_profile_photo_gen.go diff --git a/internal/tg/tl_poll_answer_gen.go b/tg/tl_poll_answer_gen.go similarity index 100% rename from internal/tg/tl_poll_answer_gen.go rename to tg/tl_poll_answer_gen.go diff --git a/internal/tg/tl_poll_answer_voters_gen.go b/tg/tl_poll_answer_voters_gen.go similarity index 100% rename from internal/tg/tl_poll_answer_voters_gen.go rename to tg/tl_poll_answer_voters_gen.go diff --git a/internal/tg/tl_poll_gen.go b/tg/tl_poll_gen.go similarity index 100% rename from internal/tg/tl_poll_gen.go rename to tg/tl_poll_gen.go diff --git a/internal/tg/tl_poll_results_gen.go b/tg/tl_poll_results_gen.go similarity index 100% rename from internal/tg/tl_poll_results_gen.go rename to tg/tl_poll_results_gen.go diff --git a/internal/tg/tl_popular_contact_gen.go b/tg/tl_popular_contact_gen.go similarity index 100% rename from internal/tg/tl_popular_contact_gen.go rename to tg/tl_popular_contact_gen.go diff --git a/internal/tg/tl_post_address_gen.go b/tg/tl_post_address_gen.go similarity index 100% rename from internal/tg/tl_post_address_gen.go rename to tg/tl_post_address_gen.go diff --git a/internal/tg/tl_privacy_key_gen.go b/tg/tl_privacy_key_gen.go similarity index 100% rename from internal/tg/tl_privacy_key_gen.go rename to tg/tl_privacy_key_gen.go diff --git a/internal/tg/tl_privacy_rule_gen.go b/tg/tl_privacy_rule_gen.go similarity index 100% rename from internal/tg/tl_privacy_rule_gen.go rename to tg/tl_privacy_rule_gen.go diff --git a/internal/tg/tl_received_notify_message_gen.go b/tg/tl_received_notify_message_gen.go similarity index 100% rename from internal/tg/tl_received_notify_message_gen.go rename to tg/tl_received_notify_message_gen.go diff --git a/internal/tg/tl_recent_me_url_gen.go b/tg/tl_recent_me_url_gen.go similarity index 100% rename from internal/tg/tl_recent_me_url_gen.go rename to tg/tl_recent_me_url_gen.go diff --git a/internal/tg/tl_reply_markup_gen.go b/tg/tl_reply_markup_gen.go similarity index 100% rename from internal/tg/tl_reply_markup_gen.go rename to tg/tl_reply_markup_gen.go diff --git a/internal/tg/tl_report_reason_gen.go b/tg/tl_report_reason_gen.go similarity index 100% rename from internal/tg/tl_report_reason_gen.go rename to tg/tl_report_reason_gen.go diff --git a/internal/tg/tl_restriction_reason_gen.go b/tg/tl_restriction_reason_gen.go similarity index 100% rename from internal/tg/tl_restriction_reason_gen.go rename to tg/tl_restriction_reason_gen.go diff --git a/internal/tg/tl_rich_text_gen.go b/tg/tl_rich_text_gen.go similarity index 100% rename from internal/tg/tl_rich_text_gen.go rename to tg/tl_rich_text_gen.go diff --git a/internal/tg/tl_saved_phone_contact_gen.go b/tg/tl_saved_phone_contact_gen.go similarity index 100% rename from internal/tg/tl_saved_phone_contact_gen.go rename to tg/tl_saved_phone_contact_gen.go diff --git a/internal/tg/tl_secure_credentials_encrypted_gen.go b/tg/tl_secure_credentials_encrypted_gen.go similarity index 100% rename from internal/tg/tl_secure_credentials_encrypted_gen.go rename to tg/tl_secure_credentials_encrypted_gen.go diff --git a/internal/tg/tl_secure_data_gen.go b/tg/tl_secure_data_gen.go similarity index 100% rename from internal/tg/tl_secure_data_gen.go rename to tg/tl_secure_data_gen.go diff --git a/internal/tg/tl_secure_file_gen.go b/tg/tl_secure_file_gen.go similarity index 100% rename from internal/tg/tl_secure_file_gen.go rename to tg/tl_secure_file_gen.go diff --git a/internal/tg/tl_secure_password_kdf_algo_gen.go b/tg/tl_secure_password_kdf_algo_gen.go similarity index 100% rename from internal/tg/tl_secure_password_kdf_algo_gen.go rename to tg/tl_secure_password_kdf_algo_gen.go diff --git a/internal/tg/tl_secure_plain_data_gen.go b/tg/tl_secure_plain_data_gen.go similarity index 100% rename from internal/tg/tl_secure_plain_data_gen.go rename to tg/tl_secure_plain_data_gen.go diff --git a/internal/tg/tl_secure_required_type_gen.go b/tg/tl_secure_required_type_gen.go similarity index 100% rename from internal/tg/tl_secure_required_type_gen.go rename to tg/tl_secure_required_type_gen.go diff --git a/internal/tg/tl_secure_secret_settings_gen.go b/tg/tl_secure_secret_settings_gen.go similarity index 100% rename from internal/tg/tl_secure_secret_settings_gen.go rename to tg/tl_secure_secret_settings_gen.go diff --git a/internal/tg/tl_secure_value_error_gen.go b/tg/tl_secure_value_error_gen.go similarity index 100% rename from internal/tg/tl_secure_value_error_gen.go rename to tg/tl_secure_value_error_gen.go diff --git a/internal/tg/tl_secure_value_gen.go b/tg/tl_secure_value_gen.go similarity index 100% rename from internal/tg/tl_secure_value_gen.go rename to tg/tl_secure_value_gen.go diff --git a/internal/tg/tl_secure_value_hash_gen.go b/tg/tl_secure_value_hash_gen.go similarity index 100% rename from internal/tg/tl_secure_value_hash_gen.go rename to tg/tl_secure_value_hash_gen.go diff --git a/internal/tg/tl_secure_value_type_gen.go b/tg/tl_secure_value_type_gen.go similarity index 100% rename from internal/tg/tl_secure_value_type_gen.go rename to tg/tl_secure_value_type_gen.go diff --git a/internal/tg/tl_send_message_action_gen.go b/tg/tl_send_message_action_gen.go similarity index 100% rename from internal/tg/tl_send_message_action_gen.go rename to tg/tl_send_message_action_gen.go diff --git a/internal/tg/tl_shipping_option_gen.go b/tg/tl_shipping_option_gen.go similarity index 100% rename from internal/tg/tl_shipping_option_gen.go rename to tg/tl_shipping_option_gen.go diff --git a/internal/tg/tl_stats_abs_value_and_prev_gen.go b/tg/tl_stats_abs_value_and_prev_gen.go similarity index 100% rename from internal/tg/tl_stats_abs_value_and_prev_gen.go rename to tg/tl_stats_abs_value_and_prev_gen.go diff --git a/internal/tg/tl_stats_broadcast_stats_gen.go b/tg/tl_stats_broadcast_stats_gen.go similarity index 100% rename from internal/tg/tl_stats_broadcast_stats_gen.go rename to tg/tl_stats_broadcast_stats_gen.go diff --git a/internal/tg/tl_stats_date_range_days_gen.go b/tg/tl_stats_date_range_days_gen.go similarity index 100% rename from internal/tg/tl_stats_date_range_days_gen.go rename to tg/tl_stats_date_range_days_gen.go diff --git a/internal/tg/tl_stats_get_broadcast_stats_gen.go b/tg/tl_stats_get_broadcast_stats_gen.go similarity index 100% rename from internal/tg/tl_stats_get_broadcast_stats_gen.go rename to tg/tl_stats_get_broadcast_stats_gen.go diff --git a/internal/tg/tl_stats_get_megagroup_stats_gen.go b/tg/tl_stats_get_megagroup_stats_gen.go similarity index 100% rename from internal/tg/tl_stats_get_megagroup_stats_gen.go rename to tg/tl_stats_get_megagroup_stats_gen.go diff --git a/internal/tg/tl_stats_get_message_public_forwards_gen.go b/tg/tl_stats_get_message_public_forwards_gen.go similarity index 100% rename from internal/tg/tl_stats_get_message_public_forwards_gen.go rename to tg/tl_stats_get_message_public_forwards_gen.go diff --git a/internal/tg/tl_stats_get_message_stats_gen.go b/tg/tl_stats_get_message_stats_gen.go similarity index 100% rename from internal/tg/tl_stats_get_message_stats_gen.go rename to tg/tl_stats_get_message_stats_gen.go diff --git a/internal/tg/tl_stats_graph_gen.go b/tg/tl_stats_graph_gen.go similarity index 100% rename from internal/tg/tl_stats_graph_gen.go rename to tg/tl_stats_graph_gen.go diff --git a/internal/tg/tl_stats_group_top_admin_gen.go b/tg/tl_stats_group_top_admin_gen.go similarity index 100% rename from internal/tg/tl_stats_group_top_admin_gen.go rename to tg/tl_stats_group_top_admin_gen.go diff --git a/internal/tg/tl_stats_group_top_inviter_gen.go b/tg/tl_stats_group_top_inviter_gen.go similarity index 100% rename from internal/tg/tl_stats_group_top_inviter_gen.go rename to tg/tl_stats_group_top_inviter_gen.go diff --git a/internal/tg/tl_stats_group_top_poster_gen.go b/tg/tl_stats_group_top_poster_gen.go similarity index 100% rename from internal/tg/tl_stats_group_top_poster_gen.go rename to tg/tl_stats_group_top_poster_gen.go diff --git a/internal/tg/tl_stats_load_async_graph_gen.go b/tg/tl_stats_load_async_graph_gen.go similarity index 100% rename from internal/tg/tl_stats_load_async_graph_gen.go rename to tg/tl_stats_load_async_graph_gen.go diff --git a/internal/tg/tl_stats_megagroup_stats_gen.go b/tg/tl_stats_megagroup_stats_gen.go similarity index 100% rename from internal/tg/tl_stats_megagroup_stats_gen.go rename to tg/tl_stats_megagroup_stats_gen.go diff --git a/internal/tg/tl_stats_message_stats_gen.go b/tg/tl_stats_message_stats_gen.go similarity index 100% rename from internal/tg/tl_stats_message_stats_gen.go rename to tg/tl_stats_message_stats_gen.go diff --git a/internal/tg/tl_stats_percent_value_gen.go b/tg/tl_stats_percent_value_gen.go similarity index 100% rename from internal/tg/tl_stats_percent_value_gen.go rename to tg/tl_stats_percent_value_gen.go diff --git a/internal/tg/tl_stats_url_gen.go b/tg/tl_stats_url_gen.go similarity index 100% rename from internal/tg/tl_stats_url_gen.go rename to tg/tl_stats_url_gen.go diff --git a/internal/tg/tl_sticker_pack_gen.go b/tg/tl_sticker_pack_gen.go similarity index 100% rename from internal/tg/tl_sticker_pack_gen.go rename to tg/tl_sticker_pack_gen.go diff --git a/internal/tg/tl_sticker_set_covered_gen.go b/tg/tl_sticker_set_covered_gen.go similarity index 100% rename from internal/tg/tl_sticker_set_covered_gen.go rename to tg/tl_sticker_set_covered_gen.go diff --git a/internal/tg/tl_sticker_set_gen.go b/tg/tl_sticker_set_gen.go similarity index 100% rename from internal/tg/tl_sticker_set_gen.go rename to tg/tl_sticker_set_gen.go diff --git a/internal/tg/tl_stickers_add_sticker_to_set_gen.go b/tg/tl_stickers_add_sticker_to_set_gen.go similarity index 100% rename from internal/tg/tl_stickers_add_sticker_to_set_gen.go rename to tg/tl_stickers_add_sticker_to_set_gen.go diff --git a/internal/tg/tl_stickers_change_sticker_position_gen.go b/tg/tl_stickers_change_sticker_position_gen.go similarity index 100% rename from internal/tg/tl_stickers_change_sticker_position_gen.go rename to tg/tl_stickers_change_sticker_position_gen.go diff --git a/internal/tg/tl_stickers_create_sticker_set_gen.go b/tg/tl_stickers_create_sticker_set_gen.go similarity index 100% rename from internal/tg/tl_stickers_create_sticker_set_gen.go rename to tg/tl_stickers_create_sticker_set_gen.go diff --git a/internal/tg/tl_stickers_remove_sticker_from_set_gen.go b/tg/tl_stickers_remove_sticker_from_set_gen.go similarity index 100% rename from internal/tg/tl_stickers_remove_sticker_from_set_gen.go rename to tg/tl_stickers_remove_sticker_from_set_gen.go diff --git a/internal/tg/tl_stickers_set_sticker_set_thumb_gen.go b/tg/tl_stickers_set_sticker_set_thumb_gen.go similarity index 100% rename from internal/tg/tl_stickers_set_sticker_set_thumb_gen.go rename to tg/tl_stickers_set_sticker_set_thumb_gen.go diff --git a/internal/tg/tl_storage_file_type_gen.go b/tg/tl_storage_file_type_gen.go similarity index 100% rename from internal/tg/tl_storage_file_type_gen.go rename to tg/tl_storage_file_type_gen.go diff --git a/internal/tg/tl_theme_gen.go b/tg/tl_theme_gen.go similarity index 100% rename from internal/tg/tl_theme_gen.go rename to tg/tl_theme_gen.go diff --git a/internal/tg/tl_theme_settings_gen.go b/tg/tl_theme_settings_gen.go similarity index 100% rename from internal/tg/tl_theme_settings_gen.go rename to tg/tl_theme_settings_gen.go diff --git a/internal/tg/tl_top_peer_category_gen.go b/tg/tl_top_peer_category_gen.go similarity index 100% rename from internal/tg/tl_top_peer_category_gen.go rename to tg/tl_top_peer_category_gen.go diff --git a/internal/tg/tl_top_peer_category_peers_gen.go b/tg/tl_top_peer_category_peers_gen.go similarity index 100% rename from internal/tg/tl_top_peer_category_peers_gen.go rename to tg/tl_top_peer_category_peers_gen.go diff --git a/internal/tg/tl_top_peer_gen.go b/tg/tl_top_peer_gen.go similarity index 100% rename from internal/tg/tl_top_peer_gen.go rename to tg/tl_top_peer_gen.go diff --git a/internal/tg/tl_true_gen.go b/tg/tl_true_gen.go similarity index 100% rename from internal/tg/tl_true_gen.go rename to tg/tl_true_gen.go diff --git a/internal/tg/tl_update_gen.go b/tg/tl_update_gen.go similarity index 100% rename from internal/tg/tl_update_gen.go rename to tg/tl_update_gen.go diff --git a/internal/tg/tl_updates_channel_difference_gen.go b/tg/tl_updates_channel_difference_gen.go similarity index 100% rename from internal/tg/tl_updates_channel_difference_gen.go rename to tg/tl_updates_channel_difference_gen.go diff --git a/internal/tg/tl_updates_difference_gen.go b/tg/tl_updates_difference_gen.go similarity index 100% rename from internal/tg/tl_updates_difference_gen.go rename to tg/tl_updates_difference_gen.go diff --git a/internal/tg/tl_updates_gen.go b/tg/tl_updates_gen.go similarity index 100% rename from internal/tg/tl_updates_gen.go rename to tg/tl_updates_gen.go diff --git a/internal/tg/tl_updates_get_channel_difference_gen.go b/tg/tl_updates_get_channel_difference_gen.go similarity index 100% rename from internal/tg/tl_updates_get_channel_difference_gen.go rename to tg/tl_updates_get_channel_difference_gen.go diff --git a/internal/tg/tl_updates_get_difference_gen.go b/tg/tl_updates_get_difference_gen.go similarity index 100% rename from internal/tg/tl_updates_get_difference_gen.go rename to tg/tl_updates_get_difference_gen.go diff --git a/internal/tg/tl_updates_get_state_gen.go b/tg/tl_updates_get_state_gen.go similarity index 100% rename from internal/tg/tl_updates_get_state_gen.go rename to tg/tl_updates_get_state_gen.go diff --git a/internal/tg/tl_updates_state_gen.go b/tg/tl_updates_state_gen.go similarity index 100% rename from internal/tg/tl_updates_state_gen.go rename to tg/tl_updates_state_gen.go diff --git a/internal/tg/tl_upload_cdn_file_gen.go b/tg/tl_upload_cdn_file_gen.go similarity index 100% rename from internal/tg/tl_upload_cdn_file_gen.go rename to tg/tl_upload_cdn_file_gen.go diff --git a/internal/tg/tl_upload_file_gen.go b/tg/tl_upload_file_gen.go similarity index 100% rename from internal/tg/tl_upload_file_gen.go rename to tg/tl_upload_file_gen.go diff --git a/internal/tg/tl_upload_get_cdn_file_gen.go b/tg/tl_upload_get_cdn_file_gen.go similarity index 100% rename from internal/tg/tl_upload_get_cdn_file_gen.go rename to tg/tl_upload_get_cdn_file_gen.go diff --git a/internal/tg/tl_upload_get_cdn_file_hashes_gen.go b/tg/tl_upload_get_cdn_file_hashes_gen.go similarity index 100% rename from internal/tg/tl_upload_get_cdn_file_hashes_gen.go rename to tg/tl_upload_get_cdn_file_hashes_gen.go diff --git a/internal/tg/tl_upload_get_file_gen.go b/tg/tl_upload_get_file_gen.go similarity index 100% rename from internal/tg/tl_upload_get_file_gen.go rename to tg/tl_upload_get_file_gen.go diff --git a/internal/tg/tl_upload_get_file_hashes_gen.go b/tg/tl_upload_get_file_hashes_gen.go similarity index 100% rename from internal/tg/tl_upload_get_file_hashes_gen.go rename to tg/tl_upload_get_file_hashes_gen.go diff --git a/internal/tg/tl_upload_get_web_file_gen.go b/tg/tl_upload_get_web_file_gen.go similarity index 100% rename from internal/tg/tl_upload_get_web_file_gen.go rename to tg/tl_upload_get_web_file_gen.go diff --git a/internal/tg/tl_upload_reupload_cdn_file_gen.go b/tg/tl_upload_reupload_cdn_file_gen.go similarity index 100% rename from internal/tg/tl_upload_reupload_cdn_file_gen.go rename to tg/tl_upload_reupload_cdn_file_gen.go diff --git a/internal/tg/tl_upload_save_big_file_part_gen.go b/tg/tl_upload_save_big_file_part_gen.go similarity index 100% rename from internal/tg/tl_upload_save_big_file_part_gen.go rename to tg/tl_upload_save_big_file_part_gen.go diff --git a/internal/tg/tl_upload_save_file_part_gen.go b/tg/tl_upload_save_file_part_gen.go similarity index 100% rename from internal/tg/tl_upload_save_file_part_gen.go rename to tg/tl_upload_save_file_part_gen.go diff --git a/internal/tg/tl_upload_web_file_gen.go b/tg/tl_upload_web_file_gen.go similarity index 100% rename from internal/tg/tl_upload_web_file_gen.go rename to tg/tl_upload_web_file_gen.go diff --git a/internal/tg/tl_url_auth_result_gen.go b/tg/tl_url_auth_result_gen.go similarity index 100% rename from internal/tg/tl_url_auth_result_gen.go rename to tg/tl_url_auth_result_gen.go diff --git a/internal/tg/tl_user_full_gen.go b/tg/tl_user_full_gen.go similarity index 100% rename from internal/tg/tl_user_full_gen.go rename to tg/tl_user_full_gen.go diff --git a/internal/tg/tl_user_gen.go b/tg/tl_user_gen.go similarity index 100% rename from internal/tg/tl_user_gen.go rename to tg/tl_user_gen.go diff --git a/internal/tg/tl_user_profile_photo_gen.go b/tg/tl_user_profile_photo_gen.go similarity index 100% rename from internal/tg/tl_user_profile_photo_gen.go rename to tg/tl_user_profile_photo_gen.go diff --git a/internal/tg/tl_user_status_gen.go b/tg/tl_user_status_gen.go similarity index 100% rename from internal/tg/tl_user_status_gen.go rename to tg/tl_user_status_gen.go diff --git a/internal/tg/tl_users_get_full_user_gen.go b/tg/tl_users_get_full_user_gen.go similarity index 100% rename from internal/tg/tl_users_get_full_user_gen.go rename to tg/tl_users_get_full_user_gen.go diff --git a/internal/tg/tl_users_get_users_gen.go b/tg/tl_users_get_users_gen.go similarity index 100% rename from internal/tg/tl_users_get_users_gen.go rename to tg/tl_users_get_users_gen.go diff --git a/internal/tg/tl_users_set_secure_value_errors_gen.go b/tg/tl_users_set_secure_value_errors_gen.go similarity index 100% rename from internal/tg/tl_users_set_secure_value_errors_gen.go rename to tg/tl_users_set_secure_value_errors_gen.go diff --git a/internal/tg/tl_video_size_gen.go b/tg/tl_video_size_gen.go similarity index 100% rename from internal/tg/tl_video_size_gen.go rename to tg/tl_video_size_gen.go diff --git a/internal/tg/tl_wall_paper_gen.go b/tg/tl_wall_paper_gen.go similarity index 100% rename from internal/tg/tl_wall_paper_gen.go rename to tg/tl_wall_paper_gen.go diff --git a/internal/tg/tl_wall_paper_settings_gen.go b/tg/tl_wall_paper_settings_gen.go similarity index 100% rename from internal/tg/tl_wall_paper_settings_gen.go rename to tg/tl_wall_paper_settings_gen.go diff --git a/internal/tg/tl_web_authorization_gen.go b/tg/tl_web_authorization_gen.go similarity index 100% rename from internal/tg/tl_web_authorization_gen.go rename to tg/tl_web_authorization_gen.go diff --git a/internal/tg/tl_web_document_gen.go b/tg/tl_web_document_gen.go similarity index 100% rename from internal/tg/tl_web_document_gen.go rename to tg/tl_web_document_gen.go diff --git a/internal/tg/tl_web_page_attribute_theme_gen.go b/tg/tl_web_page_attribute_theme_gen.go similarity index 100% rename from internal/tg/tl_web_page_attribute_theme_gen.go rename to tg/tl_web_page_attribute_theme_gen.go diff --git a/internal/tg/tl_web_page_gen.go b/tg/tl_web_page_gen.go similarity index 100% rename from internal/tg/tl_web_page_gen.go rename to tg/tl_web_page_gen.go