0.1.0 • Published 6 months ago

telescript v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

⚠️ Warning

This library is under development! It doesn't yet cover Telegram Bot API 100% and may contain bugs. Library API may change at any time. Use it in production at your own risk.

About

TeleScript is a developer-friendly wrapper for Telegram Bot API

Features

Example

import { Client } from 'telescript'

const client = new Client({
    // Create bot and get token via @botfather
    token: '0123456789:PUtY0uR0WNT37egR4m8oTtOk3NHer3-sDzP'
})

client.on('message', async (message) => {
    if (message.text.startsWith('/start')) {
        await message.chat.sendMessage('Hello World! I\'m a brand new TeleScript bot')
        await message.chat.sendMessage('✌️')
    }
})

client.polling.start()