Socket
Socket
Sign inDemoInstall

@botocrat/poller

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @botocrat/poller

Telegram server poller for Botocrat


Version published
Weekly downloads
4
increased by100%
Maintainers
1
Install size
2.49 kB
Created
Weekly downloads
 

Readme

Source

Botocrat Poller

This is a helper library for Botocrat Bot Framework

  • Polls Telegram server to receive bot updates
  • Created for quick starting in development/test environment.
  • DON'T USE THIS LIBRARY IN PRODUCTION (use Botocrat Express instead)
import Botocrat from "@botocrat/core"
import createClient from "@botocrat/telegram"
import receiveUpdates from "@botocrat/poller"

const client = createClient({token: TELEGRAM_BOT_TOKEN})
const bot = new Botocrat()
  .get("message", (req, res) => 
    res.reply("Hello " + req.from.first_name))

receiveUpdates(bot, client, 1000).poll()

Methods

poll()

Start polling

stop()

Stop polling

Keywords

FAQs

Last updated on 14 Feb 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc