https://github.com/ashokshau/gotdbot
Go wrapper for the tdlib/td .
https://github.com/ashokshau/gotdbot
go golang hacktoberfest hacktoberfest-accepted td tdlib tdlib-go tdlib-td telegram
Last synced: about 2 months ago
JSON representation
Go wrapper for the tdlib/td .
- Host: GitHub
- URL: https://github.com/ashokshau/gotdbot
- Owner: AshokShau
- License: mit
- Created: 2026-01-29T01:11:56.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2026-03-28T14:53:03.000Z (3 months ago)
- Last Synced: 2026-03-28T15:48:14.848Z (3 months ago)
- Topics: go, golang, hacktoberfest, hacktoberfest-accepted, td, tdlib, tdlib-go, tdlib-td, telegram
- Language: Go
- Homepage: https://t.me/FallenProjects
- Size: 2.97 MB
- Stars: 6
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gotdbot

[](https://pkg.go.dev/github.com/AshokShau/gotdbot)
[](LICENSE)
**gotdbot** is a powerful, pure Go wrapper for [TDLib](https://github.com/tdlib/td) (Telegram Database Library). It provides a simple and idiomatic way to build Telegram clients and bots using Go.
Current Version: **v0.9.1** and TDLib **v1.8.63**.
---
## Features
- **Pure Go**: No CGO mess in your application code (uses `purego` to load `libtdjson`).
- **High Performance**: Direct binding to TDLib's JSON interface.
- **Dispatcher System**: Built-in update dispatcher with middleware-style handlers.
- **Filters**: Powerful and composable filters for message matching.
- **Type-Safe**: Fully generated Go structs for all TDLib types and methods.
- **Context Aware**: Easy access to effective messages, chats, and users.
---
## Requirements
* **Go**: version 1.22 or newer
* **TDLib**: the compiled `libtdjson` shared library
* Follow the official [TDLib build instructions](https://tdlib.github.io/td/build.html?language=Go)
* Make sure the library is accessible on your system:
* `libtdjson.so` (Linux)
* `libtdjson.dylib` (macOS)
* `tdjson.dll` (Windows)
* **Alternative**: run
```bash
go run github.com/AshokShau/gotdbot/scripts/tools@latest
```
to automatically download the latest precompiled TDLib binaries.
---
## Installation
```bash
go get github.com/AshokShau/gotdbot
```
---
## Examples
Sample bots can be found in the [examples](./examples) directory.
- [Echo Bot](./examples/echobot): A simple bot that echoes text messages.
- [User Bot](./examples/userbot): Example of running a user account automation.
---
## Contributing
Contributions are welcome! Please open issues for bugs or feature requests.
---
## License
This project is licensed under the [MIT License](LICENSE).
---
## Inspired by
- [gotgbot](https://github.com/PaulSonOfLars/gotgbot)
- [pytdbot](https://github.com/pytdbot/client)