tdl-wrapper
v2.2.0
Published
Wrapper for TDLib
Downloads
3
Readme
TDL-wrapper
Instalation
npm install tdl-wrapper
Examples
config.ts (see https://my.telegram.org/):
export const apiId = 123456;
export const apiHash = '1234567890abcdefghijklmnopqrstuv';
export const phoneNumber = '+380123456789';
index.tx:
import { apiId, apiHash, phoneNumber } from './config';
import { Client } from 'tdl-wrapper';
const client = new Client(apiId, apiHash);
const handler = async () => {
await client.sendText('My Friend', 'ACHTUNG!!!');
};
client.connect().then(() => {
client.setLogVerbosityLevel(1);
client.login(() => ({ phoneNumber })).then(handler);
});
Docs: https://d-andrii.github.io/tdl-wrapper/