Advertisement
Guest User

node_modules/coffea-telegram/package.json

a guest
Aug 25th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.25 KB | None | 0 0
  1. {
  2. "name": "coffea-telegram",
  3. "version": "1.0.0-beta9-1",
  4. "main": "lib/index.js",
  5. "devDependencies": {
  6. "babel-cli": "^6.9.0",
  7. "babel-core": "^6.5.1",
  8. "babel-plugin-transform-object-rest-spread": "^6.5.0",
  9. "babel-preset-es2015": "^6.5.0",
  10. "eslint": "^2.0.0-rc.1",
  11. "eslint-config-standard": "^5.1.0",
  12. "eslint-plugin-promise": "^1.0.8",
  13. "eslint-plugin-standard": "^1.3.2",
  14. "rimraf": "^2.5.2"
  15. },
  16. "dependencies": {
  17. "coffea": "1.0.0-beta18",
  18. "debug-dude": "^1.0.3",
  19. "node-telegram-bot-api": "^0.21.1"
  20. },
  21. "scripts": {
  22. "lint": "./node_modules/.bin/eslint src test",
  23. "clean": "./node_modules/.bin/rimraf lib",
  24. "compile": "./node_modules/.bin/babel --presets es2015 -d lib/ src/",
  25. "prepublish": "npm run lint && npm run clean && npm run compile"
  26. },
  27. "readme": "# coffea-telegram\n\n_telegram plugin for [coffea 1.0-beta](https://github.com/caffeinery/coffea/tree/1.0-beta)_\n\n\n## Setup\n\n * Make sure to use the latest *beta* version of coffea by running: `npm install --save coffea@beta`\n * Install `coffea-telegram`: `npm install coffea-telegram`\n\n\n## Usage\n\nSpecify the telegram protocol in your network config:\n\n```js\n{\n \"protocol\": \"telegram\",\n \"token\": \"TOKEN\"\n}\n```\n\ncoffea will automatically load `coffea-telegram` when it's needed! Thus, using telegram (or other protocols) this way should work on **any** coffea project, **without any tweaks** (other than installing `coffea-telegram` and specifying the config).\n\n`coffea-telegram` aims to be compatible with coffea. Of course, features that telegram doesn't have (like joining channels) aren't available for telegram protocols, they will just\nbe ignored.\n\n\n## Special Events\n\nTelegram has some special events that IRC doesn't have, you can listen to them just like listening to messages and other events:\n\n```\nnetworks.on('EVENTNAME', (event, reply) => {\n console.log(event)\n})\n```\n\nThe following events are available: `text`, `audio`, `document`, `photo`, `sticker`, `video`, `voice`, `contact`, `location`, `new_chat_participant`, `left_chat_participant`, `new_chat_title`, `new_chat_photo`, `delete_chat_photo`, `group_chat_created`\n\nFor some example bots, check out the [coffea-bots organisation](https://github.com/coffea-bots)\nfor existing bots, or the [coffea-starter repo](https://github.com/coffea-bots/coffea-starter),\nif you want to create your own bot.\n\n\n## Telegram API\n\nYou can use:\n\n```js\nnetworks.send({\n type: 'FUNCTION_NAME',\n arguments\n})\n```\n\nto access the [telegram api](https://github.com/yagop/node-telegram-bot-api#api-reference).\nAll arguments have the same names, except the ids have all been simplified to `id` instead of `chatId`, `inlineQueryId`, etc.\n\nHere is an example:\n\n```js\nnetworks.send({\n type: 'getMe'\n}).then(\n me => console.log(me)\n)\n```\n",
  28. "readmeFilename": "README.md",
  29. "description": "_telegram plugin for [coffea 1.0-beta](https://github.com/caffeinery/coffea/tree/1.0-beta)_",
  30. "_id": "coffea-telegram@1.0.0-beta9-1",
  31. "dist": {
  32. "shasum": "f1ecdfb9d9572cb8ed15e8f0e7780b061894a80f"
  33. },
  34. "_from": "coffea-telegram@^1.0.0-beta8",
  35. "_resolved": "https://registry.npmjs.org/coffea-telegram/-/coffea-telegram-1.0.0-beta9-1.tgz"
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement