Skip to content

A package helps you deploy your application easily on bot.

License

Notifications You must be signed in to change notification settings

MamoruDS/telegram_bot_utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A package helps you deploy your application easily on bot.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published