@machinat/telegram
TypeScript icon, indicating that this package has built-in type declarations

0.6.0 • Public • Published

Telegram Platform

Receive events and send messages through Telegram.

Install

npm install @machinat/core @machinat/http @machinat/telegram
# or with yarn
yarn add @machinat/core @machinat/http @machinat/telegram

Docs

Check the platform document and the package reference.

Setup

import Machinat from '@machinat/core';
import Http from '@machinat/http';
import Telegram from '@machinat/telegram';

const {
  TELEGRAM_BOT_NAME,
  TELEGRAM_BOT_TOKEN,
  TELEGRAM_SECRET_PATH,
} = process.env;

const app = Machinat.createApp({
  modules: [
    Http.initModule({ /* ... */ }),
  ],
  platforms: [
    Telegram.intiModule({
      webhookPath: '/webhook/telegram',
      botName: TELEGRAM_BOT_NAME,
      botToken: TELEGRAM_BOT_TOKEN,
      secretPath: TELEGRAM_SECRET_PATH,
    }),
  ],
});

Readme

Keywords

none

Package Sidebar

Install

npm i @machinat/telegram

Weekly Downloads

0

Version

0.6.0

License

MIT

Unpacked Size

459 kB

Total Files

133

Last publish

Collaborators

  • lrills0515
  • lrills