TDLIB(3em)
π NAME π
Welcome to the TDLIB(3em) manual, bestie β this page is all about tdlib - bindings for Telegram Database Library. π«Ά
β¨ DESCRIPTION β¨
Okay so first, the vibe:
local tdlib = require 'tdlib'
The JSON serialization of TDLib API objects is straightforward: all API objects are represented as JSON objects with the same keys as the API object field names. No cap. The object type name is stored in the special field "@type", which is optional in places where type is uniquely determined by the context. π¦
Type mapping, because we love a cheat sheet:
- Fields of Bool type are stored as Boolean.
- Fields of int32, int53, and double types are stored as Number.
- Fields of int64 and string types are stored as String.
- Fields of bytes type are base64 encoded and then stored as String.
- Fields of array type are stored as Array.
The main TDLib interface is asynchronous β yes, itβs that girl. π
To match requests with a corresponding response, the field "@extra" can be added to the request object. The corresponding response will have an "@extra" field with exactly the same value. Matching made cute, fr fr.
Check https://core.telegram.org/tdlib/docs/td__api_8h.html for API. π
π οΈ FUNCTIONS π οΈ
π± new() β client
Signature check: new() β client. This is the one that gives you a client β main character energy, honestly. β¨
π CLIENT FUNCTIONS π
π¨ send(self, json: string)
send(self, json: string) β sends request to the TDLib client. Simple, iconic, done. π
π¬ receive(self) β string
receive(self) β string β receives incoming updates and request responses from the TDLib client. Periodt. π₯
And thatβs the whole page, bestie π«Ά Source/version: Emilua 0.12.1; date: 1980-01-01; and itβs the TDLIB(3em) manual. Stay slay and keep your @extra matched. π
β¨
π¦ where this page comes from
- nixos 26.05: emilua-tdlib 1.0.4
- nixpkgs unstable: emilua-tdlib 1.0.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms