🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

assistant-adapter-telegram

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assistant-adapter-telegram

Connect a Telegram bot to an Assistant

0.1.1
latest
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Assistant Adapter for Telegram

Assistant is a self-hosted bot service similar to Hubot (except it's not written in coffeescript!) that executes arbitrary commands to perform certain actions with a variety of adapters to allow it to run on any platform, simultaneously.

This is the telegram adapter, which allows you to interact with your assistant by messaging a Telegram bot back and forth.

$ npm install --save assistant-adapter-telegram

To get started, add the following to your assistant's package.json:

{
  "assistant-adapters": {
    "telegram": "assistant-adapter-telegram"
  },
  "assistant-config": {
    "adapters": {
      "telegram": {
        "token": "1926482dcb7fac2585775a65a7b98611ed969af"
      }
    }
  }
}

(Ensure the key of the assistant-adapters object is the same as the assistant-config.adapters object!)

Now you can start your Assistant, and if it boots without crashes you're almost ready to start interacting with your Assistant.

Finally, you have to set the Telegram web-hook in order to receive real-time updates from your bot conversations. This usually involves calling the setWebhook endpoint of the Telegram API to {your-assistant-url}/telegram. You can set the route name (if you'd prefer to not mount it at /telegram) like so:

{
  "assistant-adapters": {
    "telegram": "assistant-adapter-telegram"
  },
  "assistant-config": {
    "adapters": {
      "telegram": {
        "route": "/awesome-telegram",
        "token": "1926482dcb7fac2585775a65a7b98611ed969af"
      }
    }
  }
}

Which will make the Telegram adapter available at {your-assistant-url}/awesome-telegram :smile:

FAQs

Package last updated on 12 Apr 2016

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