Changelog
tdl@7.4.1 (2024-02-16)
tdl@7.4.1-beta.0
on 2023-11-07.Changelog
tdl@7.4.0 (2023-10-10)
tdl.setLogMessageCallback
that allows to pass a callback to the
td_set_log_message_callback
TDLib function using Node-API's thread-safe
functions. (TDLib v1.8.0+ only)tdl.configure
: Added an experimental option useNewTdjsonInterface
that
enables the use of td_create_client_id
/td_send
/td_receive
/td_execute
interface with a client manager and global receive loop, though the old
interface still works well. (TDLib v1.7.0+ only)UV_THREADPOOL_SIZE
clients is lifted.tdl.configure
: Added a receiveTimeout
advanced option.tdl.createClient
: receiveTimeout
in the client options is deprecated.tdl.createClient
: Deprecated the useMutableRename
advanced option.Changelog
tdl@7.3.2 (2023-09-21)
Symbol not found: node_register_module_v…
errors on some platforms.tdl.configure
.Changelog
tdl@7.3.1 (2023-06-22)
This update introduces some significant and long-planned changes to the interface, while retaining backward compatiblity.
tdl
and tdl-tdlib-addon
; just install
tdl
. tdl-tdlib-addon
is deprecated. The library is mostly focused to
Node.js only now, deno support can be added later as a separate library. This
simplifies tdl.configure
function, and execute
is decoupled from clients. As an example:
const tdl = require('tdl')
tdl.configure({
tdjson: 'libtdjson.dylib',
libdir: '/usr/local/lib',
verbosityLevel: 3 /* the default is 2 */
})
tdl.execute({ _: 'setLogStream', /* ... */ })
const client = tdl.createClient({
apiId: /* your api id */,
apiHash: /* your api hash */
})
await client.login()
The full documentation for the configure
function is available in the
TypeScript typings. The old new Client
approach is still supported but
deprecated.verbosityLevel
client option is deprecated (moved to tdl.configure
).prebuildify
and node-gyp-build
.tdl-tdlib-wasm
and tdl-shared
are deprecated. Any webassembly
support is removed.Client#getBackendName
.Old code:
const { Client } = require('tdl')
const { TDLib } = require('tdl-tdlib-addon')
const client = new Client(new TDLib('path/to/libtdjson'), {
apiId,
apiHash,
verbosityLevel: 0,
// ...
})
New code:
const tdl = require('tdl')
tdl.configure({ tdjson: 'path/to/libtdjson', verbosityLevel: 0 })
const client = tdl.createClient({
apiId,
apiHash,
// ...
})
If the default values of tdjson
and verbosityLevel
are used, then calling
configure
is optional.
Changelog
tdl@7.2.0 (2022-10-11)
client.connect
or client.connectAndLogin
,
these functions are deprecated.client.loginAsBot
function..d.ts
declaration file.client.setLogFatalErrorCallback
and client.destroy
.useDefaultVerbosityLevel
advanced option, it is replaced
with verbosityLevel: 'default'
.disableAuth
advanced option to bare
, disableAuth
is now
deprecated.Changelog
tdl@7.1.0 (2022-09-18)
LoginDetails
: getEmailAddress
, getEmailCode
,
confirmOnAnotherDevice
.client.getVersion(): string
function, undocumented in the README for
now.Changelog
tdl@7.0.0 (2021-01-14)
tdlib-types
for the TDLib typings to work.
It is now possible to install the typings for other TDLib versions.client.pause()
and client.resume()
are now deprecated.client.invokeFuture
.client.getBackendName(): string
function.tdl-shared@0.10.0
.tdlib-types
, see its README.tdl
package into this package.