TDLIB(3em)

πŸ“¦ version 1.0.4, in nixos 26.05, nixpkgs unstable

πŸ’– 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