New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@builderbot-plugins/telegram

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@builderbot-plugins/telegram

An telegram provider for Bot plugins framework

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
16
33.33%
Maintainers
2
Weekly downloads
 
Created
Source

Telegram provider for bot-whatsapp

The provider using a polka server Polka for bot-whatsapp bot. You can apply this provider into your createProvider function.

Usage

import 'dotenv/config'
import { addKeyword, createBot, createFlow, createProvider, EVENTS, MemoryDB } from '@bot-whatsapp/bot'
import { TelegramProvider, handleCtx } from '@builderbot-plugins/telegram'

const flowWelcome = addKeyword<TelegramProvider, MemoryDB>(EVENTS.WELCOME)
    .addAnswer("Hola desde telegram provider!")

const main = async () => {
    let provider = createProvider(TelegramProvider, {
        token: process.env.TELEGRAM_TOKEN
    })
        .initHttpServer(3002)

    provider.http?.server.post('/webhook', handleCtx(async (bot, req, res) => {
        return res.end('Hola desde telegram webhook provider!')
    }))


    await createBot({
        database: new MemoryDB(),
        provider,
        flow: createFlow([flowWelcome])
    })
}

main()

Author

Elimeleth Capuano https://github.com/elimeleth

FAQs

Package last updated on 27 Mar 2024

Did you know?

Socket

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