0.0.8 • Published 10 months ago

@beavernsticks/moleculer-telegram-bot v0.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

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

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago