![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
tdlib-native
Advanced tools
Cross platform TDLib wrapper
TDLib
is a fastest way to interact with Telegram on NodeJS. It's written in C++ with optimized network stack and caching./**
* Sends a message. Returns the sent message
*
* @throws {TDError}
* @param {sendMessage$DirectInput} parameters {@link sendMessage$Input}
* @returns {Promise<Message>} Promise<{@link Message}>
*/
async sendMessage(parameters: sendMessage$DirectInput): Promise<Message>
node-addon-api
, debug
, detect-libc
npm
npm i tdlib-native
Yarn
yarn add tdlib-native
pnpm
pnpm add tdlib-native
client.start()
, client.pause()
and client.destroy()
- asyncThis is raw wrapper of TDLib
import { Client, Authenticator } from "tdlib-native";
import { TDLibAddon } from "tdlib-native/addon";
async function init() {
// Loading addon
const adapter = await TDLibAddon.create();
// Make TDLib shut up. Immediately
Client.disableLogs(adapter);
const client = new Client(adapter);
const authenticator = Authenticator.create(client)
.tdlibParameters({
/* options */
})
.token(process.env.TELEGRAM_BOT_TOKEN);
// Start polling responses from TDLib
// And authenticate bot
// THIS SHOULD BE USED via Promise.all
// OR ELSE .authenticate() skips an update and hangs
await Promise.all([client.start(), authenticator.authenticate()]);
// client authorized as bot
// Call any tdlib method
await client.api.getOption({ name: "version" });
// => Promise { _: "optionValueString", value: "1.8.37" }
// or use a wrapper
await client.tdlibOptions.get("version");
// => Promise "1.8.22"
// Subscribe to updates
client.updates.subscribe(console.log);
// Pause receiving updates. Will freeze method all running API calls
// await client.pause();
// Resume pause
// await client.start();
// Destroy
await client.api.close({});
await client.destroy();
}
Usage with RxJS
// Observable will complete after client.destroy() call
const updates = new Observable(client.updates.toRxObserver());
tdlib-native
![]() GuardCore Bot |
![]() Твоя Статья УК РФ |
![]() Add your project |
This package is based on eilvelia/tdl
Licenses:
FAQs
🚀 Telegram TDLib native nodejs wrapper
The npm package tdlib-native receives a total of 65 weekly downloads. As such, tdlib-native popularity was classified as not popular.
We found that tdlib-native demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.