High-level Telegram client for Node.js/TypeScript built on TDLib.
Status: Early development. Not ready for production use.
- Official foundation — Built on TDLib, not a custom MTProto implementation
- TypeScript-first — Full type safety out of the box
- High-level API — Inspired by the best patterns from GramJS and Telethon
import { TelegramClient } from 'tdgram.js'
const client = new TelegramClient({ apiId, apiHash })
await client.start()
client.on('message', async (msg) => {
if (msg.text === 'ping') {
await msg.reply('pong')
}
})
const chats = await client.getChats({ limit: 20 })
await client.sendMessage(chatId, 'Hello!')npm install tdgram.jsMIT