telegram-bot-utils
TypeScript icon, indicating that this package has built-in type declarations

0.4.2 • Public • Published

Telegram Bot Utils

A package helps you deploy your application easily on bot.

This document is still at very early stage.

API reference still on the way 🚧

Example Usage

npm i telegram-bot-utils

Simply use with Node.js Telegram Bot API.

Start your bot

const TelegramBot = require('node-telegram-bot-api')
const BotUtils = require('telegram-bot-utils')

const token = process.env.BOT_TOKEN || 'token'

BotUtils.options.botAPIConstructor = TelegramBot
const bot = BotUtils.bots.add('bot_name', {
    api: {
        token: token,
        options: {
            polling: true,
        },
    },
})

bot.event.on('ready', () => {
    bot.api.on('message', (msg) => {
        console.log(msg)
    })
})

License

MIT License copyright © 2020 MamoruDS

Readme

Keywords

none

Package Sidebar

Install

npm i telegram-bot-utils

Weekly Downloads

11

Version

0.4.2

License

MIT

Unpacked Size

435 kB

Total Files

66

Last publish

Collaborators

  • mamoruds