🚀 DAY 3 OF LAUNCH WEEK:Announcing Bun and vlt Support in Socket.Learn more →
Socket
Book a DemoInstallSign in
Socket

@beavernsticks/moleculer-telegram-bot

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@beavernsticks/moleculer-telegram-bot

Telegram Bot package for Moleculer framework

latest
Source
npmnpm
Version
0.0.8
Version published
Maintainers
1
Created
Source

Moleculer logo


Telegram bot support for Moleculer microservices framework based on GrammY. NPM version


Install

$ npm install @beavernsticks/moleculer-telegram-bot --save

Usage

Add TelegramBotMixin to your service

import { TelegramBotMixin } from '@beavernsticks/moleculer-telegram-bot'

broker.createService({
  name: 'greeter',
  mixins: [TelegramBotMixin],
  settings: {
    telegram: {
      token: '<BOT TOKEN>',
    },
  },
  actions: {
    welcome: {
      handler(ctx) {
        return this.sendMessage(ctx, 'Hello!', { tgId: 12345 })
      },
    },
  },
})

Configurations

Setting fields

PropertyTypeDefaultDescription
tokenstringrequiredBot token from @BotFather.

License

The project is available under the MIT license.

Contact

Copyright (c) 2023 Beaver'n'Sticks

Keywords

moleculer

FAQs

Package last updated on 31 Aug 2023

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