tdl-wrapper
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

TDL-wrapper

Build Status

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/

Readme

Keywords

Package Sidebar

Install

npm i tdl-wrapper

Weekly Downloads

1

Version

2.2.0

License

MIT

Unpacked Size

8.55 kB

Total Files

8

Last publish

Collaborators

  • dandrii