0.0.8 • Published 1 year ago

@beavernsticks/moleculer-telegram-bot v0.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago