Socket
Socket
Sign inDemoInstall

assistant-adapter-telegram

Package Overview
Dependencies
51
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    assistant-adapter-telegram

Connect a Telegram bot to an Assistant


Version published
Weekly downloads
4
increased by300%
Maintainers
1
Install size
5.61 MB
Created
Weekly downloads
 

Readme

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

Last updated on 12 Apr 2016

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc