Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bstrdlord/zgram
the best (as of 2024) zig framework for creating telegram bots
https://github.com/bstrdlord/zgram
framework telegram telegram-bot telegram-framework zig
Last synced: 12 days ago
JSON representation
the best (as of 2024) zig framework for creating telegram bots
- Host: GitHub
- URL: https://github.com/bstrdlord/zgram
- Owner: bstrdlord
- Created: 2024-08-13T20:22:11.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-10-13T16:37:32.000Z (3 months ago)
- Last Synced: 2024-12-28T23:21:08.292Z (26 days ago)
- Topics: framework, telegram, telegram-bot, telegram-framework, zig
- Language: Zig
- Homepage:
- Size: 12.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# zgram
## 💡 Info
In development. use at your own risk## 🚀 Example
full example: [src/main.zig](https://github.com/blockkwork/zgram/blob/main/src/main.zig)```zig
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();var tg = try Client.init(allocator, TOKEN, .{});
{
try tg.handleAll(handleKeyboard); // handle all messages
try tg.command("start", handleAll); // handle /start command
try tg.hears("hello from zgram!", handleAll); // handle message
try tg.action("data1", handleQuery); // handle callback query
}
try tg.startPolling(.{ .drop_pending_updates = true });
```![image](https://github.com/user-attachments/assets/fa302fab-4230-4298-883d-e2f8c77454ce)