Socket
Book a DemoInstallSign in
Socket

@machinat/telegram

Package Overview
Dependencies
Maintainers
2
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@machinat/telegram

Messenger platform for Machinat.

latest
Source
npmnpm
Version
0.6.0
Version published
Maintainers
2
Created
Source

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,
    }),
  ],
});

FAQs

Package last updated on 08 Jun 2022

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