feathers-telegram-bot

Connect your feathers app to a Telegram Bot


Keywords
feathers, feathers-plugin, telegram, bot, feathersjs, telegram-bot
License
MIT
Install
npm install feathers-telegram-bot@0.0.1-6

Documentation

Feathers Telegram Bot

Build Status Code Climate Test Coverage Dependency Status Download Status

Connect your feathers app to a Telegram Bot

Installation

npm install feathers-telegram-bot --save

Documentation

Under construction.

Complete Example

Here's an example of a Feathers server that uses feathers-telegram-bot.

const feathers = require('feathers');
const rest = require('feathers-rest');
const hooks = require('feathers-hooks');
const bodyParser = require('body-parser');
const errorHandler = require('feathers-errors/handler');
const telegramBot = require('feathers-telegram-bot');

// Initialize the application
const app = feathers()
  .configure(rest())
  .configure(hooks())
  // Needed for parsing bodies (login)
  .use(bodyParser.json())
  .use(bodyParser.urlencoded({ extended: true }))
  // Initialize Feathers Telegram Bot
  .use(telegramBot({
    username: "Your_Bot",
    token: "[your-token-here]"
  }))
  .use(errorHandler());

app.listen(3030);

console.log('Feathers app started on 127.0.0.1:3030');

License

Copyright (c) 2017

Licensed under the MIT license.