GoTGProto
106 subscribers
22 links
GoTGProto is a wrapper for github.com/gotd/td.
It aims to make td's raw functions easy to user with the help of its helpers packages.
Repository: github.com/anonyindian/gotgproto
Download Telegram
Channel created
GoTGProto is a helper package for gotd library, It aims to make td's raw functions easy-to-use with the help of features like using session strings, custom helper functions, storing peers and extracting chat or user ids through it etc.

You can use this package to create bots and userbots with Telegram MTProto easily in golang

Repository: https://github.com/anonyindian/gotgproto
Examples: click here for the examples
Documentations: click here for the docs
Support Group: @GoTGProtoChat
🎉 First Beta Release

We are proud to announce the first beta release of the gotgproto library i.e. v1.0.0-beta01 .

Features:
• Easy to setup client authorization and updates handling.
• Support for the session strings including telethon's.
• Storage for the session and peers using SQLite.
• Support for the handlers and handler groups.
• Helpers for functions like SendMessage, GetChat, GetUser etc.
• Support for filters on the handlers like text filter, video filter etc.
• Many more, check them out yourself in the repository.

Repository: https://github.com/anonyindian/gotgproto
Examples: click here for the examples
Documentations: click here for the docs
Support Group: @GoTGProtoChat
🤩5
🎉 GoTGProto New Update

We have just released v1.0.0-beta02 of the library.

Changelog:
• Added:
- Regex filter for messages
- New pending join requests handler and filters
- Callback query and inline query filters
- Helper for editing messages

• Filters are now moved to their specific types, check usage example here
• Send helpers return tg.Message object instead of updates class

As usual, upgrade using:
go get github.com/anonyindian/gotgproto@v1.0.0-beta02

Repository: https://github.com/anonyindian/gotgproto
Examples: click here for the examples
Documentations: click here for the docs
Support Group: @GoTGProtoChat
🎉3👍2
🎉 GoTGProto New Update

We have just released v1.0.0-beta03 of the library.

Changelog:
• Fixed compilation error caused by the package handlers due to v1.0.0-beta02
• Users can now add their phone number via input instead of pre providing in the ClientHelper struct
• Fixed some typos in the documentations

As usual, upgrade using:
go get github.com/anonyindian/gotgproto@v1.0.0-beta03

Repository: https://github.com/anonyindian/gotgproto
Examples: click here for the examples
Documentations: click here for the docs
Support Group: @GoTGProtoChat
2
🎉 GoTGProto New Update

We have just released v1.0.0-beta04 of the library.

Changelog:
• Added ChatMemberUpdated handlers and filters
• Added GetMessages raw helper
• Fixed nil message returned when the message was sent in a private chat
• Fixed PendingJoinRequests filters which were not functional earlier
• Updated documentations

As usual, upgrade using:
go get github.com/anonyindian/gotgproto@v1.0.0-beta04

Repository: https://github.com/anonyindian/gotgproto
Examples: click here for the examples
Documentations: click here for the docs
Support Group: @GoTGProtoChat
This media is not supported in your browser
VIEW IN TELEGRAM
🎉 GoTGProto New Update

We have just released v1.0.0-beta05 of the library.

Changelog:
• Added retry functionality for wrong 2FA password
• Added PublicKeys, DC, DCList, Resolver fields to ClientHelper struct for better flexibility.
• Optimised Command handlers.
• Inherited context.Context in ext.Context to reduce boilerplate codes.
• Added following helpers:
- GetMessages
- BanChatMember
- UnbanChatMember
- AddChatMembers
- ArchiveChats
- UnarchiveChats
- CreateChannel
- CreateChat
- ResolveUsername
• Added a new interface: UnitedChat which covers all the chat types (Channel, Chat, User)
• Fixed a long known bug due to which session couldn't be restored from .session file
• Updated documentations

As usual, upgrade using:
go get github.com/anonyindian/gotgproto@v1.0.0-beta05

Repository: https://github.com/anonyindian/gotgproto
Examples: click here for the examples
Documentations: click here for the docs
Support Group: @GoTGProtoChat
🎉 GoTGProto New Update

We have just released v1.0.0-beta06 of the library.

Changelog:
v1.0.0-beta05...v1.0.0-beta06

As usual, upgrade using:
go get github.com/anonyindian/gotgproto@v1.0.0-beta05

Repository: https://github.com/anonyindian/gotgproto
Examples: click here for the examples
Documentations: click here for the docs
Support Group: @GoTGProtoChat
We're proud to announce the GIGA userbot, a powerful and fast telegram userbot being written in Go using GoTGProto.

This would be an active example implementation for GoTGProto.

Source Code: github.com/gigauserbot/giga

Repository: https://github.com/anonyindian/gotgproto
Examples: click here for the examples
Documentations: click here for the docs
Support Group: @GoTGProtoChat
🎉 GoTGProto New Update

We have just released v1.0.0-beta08 of the library.

Changelog:
v1.0.0-beta06...v1.0.0-beta08

As usual, upgrade using:
go get github.com/anonyindian/gotgproto@v1.0.0-beta08

Repository: https://github.com/anonyindian/gotgproto
Examples: click here for the examples
Documentations: click here for the docs
Support Group: @GoTGProtoChat
2
This media is not supported in your browser
VIEW IN TELEGRAM
👎3
People say, I'm a dead library, but am I? Or is it just a span of hibernation? 🧐
🤔3🤣1
🎉 GoTGProto New Update

We have just released v1.0.0-beta09 of the library.

Changelog:
v1.0.0-beta08...v1.0.0-beta09

As usual, upgrade using:
go get github.com/anonyindian/gotgproto@v1.0.0-beta09

Repository: https://github.com/anonyindian/gotgproto
Examples: click here for the examples
Documentations: click here for the docs
Support Group: @GoTGProtoChat
Hello 👋, here we resume the development of library further followed by many new updates and breaking changes.

Suggestions and bug reports are welcome anytime :)

Repository: https://github.com/anonyindian/gotgproto
Examples: click here for the examples
Documentations: click here for the docs
Support Group: @GoTGProtoChat
Please open Telegram to view this post
VIEW IN TELEGRAM
🎉 GoTGProto New Update

We have just released v1.0.0-beta10 of the library that brings a lot of optimizations along with some breaking changes. This update also fixes a very old issue of the library which used to cause high memory usage.

As usual, upgrade using:
go get github.com/anonyindian/gotgproto@v1.0.0-beta10

Changelog:
Updated GoTD to v0.82.0
Deprecated ctx.ForwardMessage (Use ctx.ForwardMessages now)
Replaced BigCache with Cacher for cache
Fixed high memory usage (It uses around 5MBs now, earlier it was 100+ MBs)
Rewrote GoTGProto client utilities, it should be more handy and cleaner to create a new client now.
Added a new dispatcher.Dispatcher interface to allow using custom dispatcher.
Renamed dispatcher.CustomDispatcher to dispatcher.NativeDispatcher
Made some optimizations in command and message handlers
Added types.Message, which is a union of tg.Message, tg.MessageService, and tg.MessageEmpty structs.
• Now, ext.Update.EffectiveMessage is of the type *types.Message.
Added a new optional field in ClientOpts, named AutoFetchReply (setting this field to true will automatically cast. ReplyToMessage field in update.EffectiveMessage)
Added client.ExportSessionString(), client.RefreshContext(ctx) and client.CreateContext() methods to gotgproto.Client.
• Peers for logged in user will now be saved in session while starting the client.
Removed an unintentional display of session data in os.Stdout.
Added SystemLangCode and ClientLangCode optional fields to gotgproto.Client.
Moved helper methods errors to errors package.
Added client.Stop() method to gotgproto.Client to cancel the running context and stop the client.
Added dispatcher.StopClient handler error, which if returned through a handler callback will result in stopping the client.
Added client.Start() method to gotgproto.Client to login and connect to telegram (Note: It's already called by gotgproto.NewClient() hence you don't need to call it again. However, it should be used to re-establish a connection once it's closed via gotgproto.Client.Stop())
Fixed session and peers database initialization happening twice per login.
update.EffectiveMessage.Message is no longer the message text, it now contains *tg.Message (use update.EffectiveMessage.Text for message's text)

Known Issues:
ctx.SendMediaGroup is added to the release mistakenly, it doesn't work and is just a dead method.
• Some examples are still using update.EffectiveMessage.Message as text of a message which wouldn't work, and needs to be replaced by update.EffectiveMessage.Text.

Full Changelog: Click here

Repository: https://github.com/anonyindian/gotgproto
Examples: click here for the examples
Documentations: click here for the docs
Support Group: @GoTGProtoChat
🔥31🥰1🎉1
🎉 GoTGProto New Update

We have just released v1.0.0-beta13 of the library.

As usual, upgrade using:
go get github.com/celestix/gotgproto@v1.0.0-beta13

Changelog:
Updated to GoTD to v0.88.0 (Layer 164)
Redesigned session initialization (Now supports logging in with just string session in memory as well as session file)
• Added Middlewares and Device fields to ClientOpts
ctx.ForwardMediaGroup won't omit error now

This update was majorly written by @W_ARM, thanks to them for their contributions!

Full Changelog: Click here

Repository: https://github.com/celestix/gotgproto
Examples: click here for the examples
Documentations: click here for the docs
Support Group: @GoTGProtoChat


NOTE: Module name has been changed from github.com/anonyindian/gotgproto to github.com/celestix/gotgproto, please refactor it in your projects accordingly!
💩2👀2🎉1
GoTGProto is now a part of hacktoberfest 2023 🎉, contributions in order to achieve the its PR goals are welcome now :)
-> https://github.com/celestix/gotgproto

Repository: https://github.com/celestix/gotgproto
Examples: click here for the examples
Documentations: click here for the docs
Support Group: @GoTGProtoChat
🎉 GoTGProto New Update

We have just released v1.0.0-beta14 of the library.

As usual, upgrade using:
go get github.com/celestix/gotgproto@v1.0.0-beta14


Changelog:
Updated to GoTD to v0.91.0 (Layer 167)
Adapted pure Go SQLite driver (This means you will no longer need CGO!) #40
Redesigned peers storage mechanism and made it compatible for multiple clients
Redesigned session initialization system to make its function simpler and efficient #38
Fixed exporting session string #33
Fixed ability to use dc resolver #35
Fixed a bug due to which last styled element was not added to styling map #36
Fixed a bug in retrieving reply-to messages and enhanced it to retrieve entire reply chain #37
Fixed a bug due to which client would stuck on failed login attempts (due to a deadlock)
Added a few more examples for less confusion

New Contributors:
@jimpo26 made their first contribution in #36
@EverythingSuckz made their first contribution in #40

Significant Notes:
• This update mainly focused on fixing bugs and making the library compatible for running multiple clients.
• Since library is no longer using traditional SQLite driver which needed CGO, you can disable it if you want to.
• You need to set InMemory bool var to true in ClientOpts to start a memory based session.
• Old functions in sessionMaker package are removed in favor of the new design, please check them out in the source code.
``

Full Changelog: Click here



Repository: https://github.com/celestix/gotgproto
Examples: click here for the examples
Documentations: click here for the docs
Support Group: @GoTGProtoChat
3
🎉 GoTGProto New Update

We have just released v1.0.0-beta15 of the library.

As usual, upgrade using:
go get github.com/celestix/gotgproto@v1.0.0-beta15


Changelog:
Updated to GoTD to v0.93.0 (Layer 170)
Fixed client.ExportStringSession() and add RunMiddleware field to client. #41
Added an optional field to specify custom Context #44
Added all fields to gotgproto.Client from telegram.Client for flexible usage in #48
• Add an interface for AuthConversation to allow developers to use custom interaction method while authenticating a client. #46

Repository: https://github.com/celestix/gotgproto
Examples: click here for the examples
Documentations: click here for the docs
Support Group: @GoTGProtoChat
2🔥2